-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
feat: Add support for "Prefer Cross-Fade Transitions" into AccessibilityInfo #34406
Changes from all commits
b7d7981
b81a489
d289d8f
5c81481
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1183,6 +1183,11 @@ class DisplayOptionsStatusExample extends React.Component<{}> { | |
optionChecker={AccessibilityInfo.isReduceMotionEnabled} | ||
notification={'reduceMotionChanged'} | ||
/> | ||
<DisplayOptionStatusExample | ||
optionName={'Prefer Cross-Fade Transitions'} | ||
optionChecker={AccessibilityInfo.prefersCrossFadeTransitions} | ||
notification={'prefersCrossFadeTransitionsChanged'} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @makovkastar I'm not sure, UIKit has this bug that causes
|
||
/> | ||
<DisplayOptionStatusExample | ||
optionName={'Screen Reader'} | ||
optionChecker={AccessibilityInfo.isScreenReaderEnabled} | ||
|
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.
AccessibilityInfo is typed with AccessibilityInfoType that is defined here: https://github.com/facebook/react-native/blob/main/Libraries/Components/AccessibilityInfo/AccessibilityInfo.flow.js.
@gabrieldonadel you need to add this method to the interface, otherwise Flow is complaining about the missing property.
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.
Ohh I see, seems that this file was recently added and my branch was out of date, I've just added this AccessibilityInfo.flow.js.