UNPKG

react-native-thanos-snap-animation

Version:
69 lines 2.06 kB
import React from 'react'; import { StyleProp, ViewStyle } from 'react-native'; import type { UIState } from './types/common.types'; export type InfinityGauntletProps = { children?: React.ReactNode; /** * (optional), default: `32` * Number of canvas use for dust animation, the more canvas the more smooth look on the animation, but also more lagging and slower initial */ canvasCount?: number; /** * (optional), default: `2` * Index of the component in UI stack, use this if you want to bring your UI to front */ zIndex?: number; /** * (optional) * Set the snap animation state */ snap?: boolean; /** * (optional) * Flag to reduce re-init the animation canvas when you update the main component */ disablePrepareOnReload?: boolean; /** * (optional), default: `true` * Move some heavy function to webview, this can reduce some time but may not supported in big components or some devices with low memory heap */ useWebViewHandler?: boolean; /** * (optional) * Trigger when dust animation initialization start */ onAnimationPrepare?: () => any; /** * (optional) * Trigger when dust animation is ready to use */ onAnimationReady?: () => any; /** * (optional) * Trigger when there is an error in the component functions */ onError?: (error?: any) => any; /** * (optional) * Trigger when snap animation is completed */ onAnimationCompleted?: (state?: UIState) => any; /** * (optional) * Style of the Wrapper */ style?: StyleProp<ViewStyle>; /** * (optional) * Style of the Main UI component */ originalElementStyle?: StyleProp<ViewStyle>; /** * (optional) * Style of the dust canvas list */ canvasContainerStyle?: StyleProp<ViewStyle>; }; declare const InfinityGauntlet: React.FC<InfinityGauntletProps>; export default InfinityGauntlet; //# sourceMappingURL=InfinityGauntlet.d.ts.map