=
- // useRef()
- const mergedLottieProps = mergeProps(defaultLottieProps, lottieProps)
- React.useImperativeHandle(ref, () => loadingLottieRef)
const classPrefix = 'nut-loading'
const getLoadingIcon = () => {
- if (!rest.jsonData) {
- console.warn('Lottie animation requires jsonData prop')
- }
- if (rest.type === 'lottie') {
- return (
-
- )
- }
const LoadingIcon = loadingMap[rest.type] || IconLoading1
return
}
const iconboxClassName = () => {
- if (rest.type === 'lottie') return `${classPrefix}-lottie-box`
- return `${classPrefix}-icon-box`
+ return !icon ? `${classPrefix}-icon-box` : ''
}
return (
extends BaseProps {
type: LoadingType