File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ const Provider = (props: Props) => {
86
86
...props . theme ,
87
87
version : themeVersion ,
88
88
animation : {
89
+ ...props . theme ?. animation ,
89
90
scale : reduceMotionEnabled ? 0 : 1 ,
90
91
} ,
91
92
} ;
Original file line number Diff line number Diff line change @@ -96,6 +96,20 @@ describe('Provider', () => {
96
96
) ;
97
97
} ) ;
98
98
99
+ it ( 'handles overriding animation with the custom one' , ( ) => {
100
+ const { getByTestId } = render (
101
+ createProvider ( {
102
+ ...MD3LightTheme ,
103
+ animation : { defaultAnimationDuration : 250 } ,
104
+ } )
105
+ ) ;
106
+
107
+ expect ( getByTestId ( 'provider-child-view' ) . props . theme ) . toStrictEqual ( {
108
+ ...MD3LightTheme ,
109
+ animation : { scale : 1 , defaultAnimationDuration : 250 } ,
110
+ } ) ;
111
+ } ) ;
112
+
99
113
it ( 'should set AccessibilityInfo listeners, if there is no theme' , async ( ) => {
100
114
mockAppearance ( ) ;
101
115
mockAccessibilityInfo ( ) ;
You can’t perform that action at this time.
0 commit comments