Skip to content

Commit 9b4ef4d

Browse files
authored
fix: bottom sheet not appearing for users that have reduced motion turned on (#1743)(by @fobos531)
1 parent 8b62dca commit 9b4ef4d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/utilities/animate.ts

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
withTiming,
55
withSpring,
66
AnimationCallback,
7+
ReduceMotion,
78
} from 'react-native-reanimated';
89
import { ANIMATION_CONFIGS, ANIMATION_METHOD } from '../constants';
910

@@ -26,6 +27,11 @@ export const animate = ({
2627
configs = ANIMATION_CONFIGS;
2728
}
2829

30+
// Users might have an accessibililty setting to reduce motion turned on.
31+
// This prevents the animation from running when presenting the sheet, which results in
32+
// the bottom sheet not even appearing so we need to override it to ensure the animation runs.
33+
configs.reduceMotion = ReduceMotion.Never;
34+
2935
// detect animation type
3036
const type =
3137
'duration' in configs || 'easing' in configs

0 commit comments

Comments
 (0)