-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ReducedMotionConfig
component
#6164
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of overriding it this simply!
packages/react-native-reanimated/src/component/ReduceMotionConfig.tsx
Outdated
Show resolved
Hide resolved
packages/react-native-reanimated/src/component/ReduceMotionConfig.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it lacks some logic
packages/react-native-reanimated/src/component/ReduceMotionConfig.tsx
Outdated
Show resolved
Hide resolved
packages/react-native-reanimated/src/component/ReduceMotionConfig.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it's fine 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the refactor - just please tak a look at linter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
ReduceMotionConfig
componentReducedMotionConfig
component
Summary
This PR adds
ReduceMotionConfig
component that allows to determine the default animation behavior in response to the device's reduced motion accessibility setting. It affects application globally. The default behavior disables all animation if reduced motion is enabled on a device. You can utilize this component to override that behavior.Usage
Demo
Screen.Recording.2024-06-24.at.18.25.37.mov
Test plan
Open
Reduce Motion
example from example app.