This repository was archived by the owner on Mar 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,7 +81,12 @@ const AnimatedFCWithRef = Animated.createAnimatedComponent(SomeFCWithRef);
8181
8282function CreateAnimatedComponentTest1 ( ) {
8383 const animatedProps = useAnimatedProps ( ( ) => ( { fill : 'blue' } ) ) ;
84- return < AnimatedPath animatedProps = { animatedProps } /> ;
84+ return (
85+ < AnimatedPath
86+ animatedProps = { animatedProps }
87+ style = { { backgroundColor : 'red' } }
88+ />
89+ ) ;
8590}
8691
8792function CreateAnimatedComponentTest2 ( ) {
Original file line number Diff line number Diff line change @@ -146,10 +146,14 @@ declare module 'react-native-reanimated' {
146146 > ;
147147 } ;
148148
149- export type AnimateProps < P extends object > = {
150- [ K in keyof P ] : K extends 'style'
151- ? StyleProp < AnimateStyle < P [ K ] > >
152- : P [ K ] | AnimatedNode < P [ K ] > ;
149+ export type StylesOrDefault < T > = 'style' extends keyof T
150+ ? T [ 'style' ]
151+ : Record < string , unknown > ;
152+
153+ export type AnimateProps < P extends Record < string , unknown > > = {
154+ [ K in keyof P ] : P [ K ] | AnimatedNode < P [ K ] > ;
155+ } & {
156+ style ?: StyleProp < AnimateStyle < StylesOrDefault < P > > > ;
153157 } & {
154158 animatedProps ?: Partial < AnimateProps < P > > ;
155159 layout ?:
You can’t perform that action at this time.
0 commit comments