import React from 'react'; import * as Animatable from 'react-native-animatable'; import { SpinnerComponent } from '../../components'; import type { AnimatableViewProps } from './AnimatableTypes'; import { SpinnerButtonStyle } from '../../styles'; const AnimatableView: React.FC = ({ animationType, children, customSpinnerComponent, height, size, spinnerColor, spinnerType, indicatorCount, spinnerOptions, isLoading, animatedDuration, }: AnimatableViewProps) => { const isCustomeSpinner: boolean = customSpinnerComponent !== null && customSpinnerComponent !== undefined; return ( <> {!isLoading && ( {children} )} {isLoading && ( {isCustomeSpinner && customSpinnerComponent} {!isCustomeSpinner && ( )} )} ); }; export default AnimatableView;