UNPKG

react-native-reanimated

Version:

More powerful alternative to Animated library for React Native.

24 lines 1.61 kB
import type { ComponentClass, ComponentType, FunctionComponent } from 'react'; import type { FlatList, FlatListProps } from 'react-native'; import type { AnimateProps } from '../helperTypes'; import type { Options } from './AnimatedComponent'; type AnimatableComponent<C extends ComponentType<any>> = C & { jsProps?: string[]; }; /** * Lets you create an Animated version of any React Native component. * * @param component - The component you want to make animatable. * @returns A component that Reanimated is capable of animating. * @see https://docs.swmansion.com/react-native-reanimated/docs/core/createAnimatedComponent */ export declare function createAnimatedComponent<P extends object>(component: AnimatableComponent<FunctionComponent<P>>, options?: Options<P>): FunctionComponent<AnimateProps<P>>; export declare function createAnimatedComponent<P extends object>(component: AnimatableComponent<ComponentClass<P>>, options?: Options<P>): ComponentClass<AnimateProps<P>>; export declare function createAnimatedComponent<P extends object>(component: AnimatableComponent<ComponentType<P>>, options?: Options<P>): FunctionComponent<AnimateProps<P>> | ComponentClass<AnimateProps<P>>; /** * @deprecated Please use `Animated.FlatList` component instead of calling * `Animated.createAnimatedComponent(FlatList)` manually. */ export declare function createAnimatedComponent(component: AnimatableComponent<typeof FlatList<unknown>>, options?: Options<typeof FlatList<unknown>>): ComponentClass<AnimateProps<FlatListProps<unknown>>>; export {}; //# sourceMappingURL=createAnimatedComponent.d.ts.map