Skip to content
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 ReduceMotionConfig component #6164

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

piaskowyk
Copy link
Member

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

function App() {
  
  return (
    // ...
    <ReduceMotionConfig mode={ReduceMotion.Never} />
    // ...
  );
}

Demo

Screen.Recording.2024-06-24.at.18.25.37.mov

Test plan

Open Reduce Motion example from example app.

Copy link
Contributor

@szydlovsky szydlovsky left a 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!

Copy link
Contributor

@szydlovsky szydlovsky left a 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

@szydlovsky szydlovsky self-requested a review June 27, 2024 15:00
Copy link
Contributor

@szydlovsky szydlovsky left a 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 👍

@szydlovsky szydlovsky self-requested a review June 27, 2024 16:08
Copy link
Contributor

@szydlovsky szydlovsky left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants