import React, { FC } from 'react' import LottieView from 'lottie-react-native' import { StyleProp, ViewStyle } from 'react-native' export const LottieAnimation: FC = (props) => { return ( { if (!isCanceled) { props.onAnimationFinish?.() } }} speed={props.speed} duration={props.duration} renderMode={props.renderMode} /> ) } export interface LottieAnimationProps { animation: string size?: number resizeMode?: 'contain' | 'cover' | 'center' speed?: number duration?: number loop?: boolean autoplay?: boolean renderMode?: 'AUTOMATIC' | 'HARDWARE' | 'SOFTWARE' onAnimationFinish?: () => void style?: StyleProp }