-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[pickers] Clean the internals and the public API of <PickersPopper />
#16319
base: master
Are you sure you want to change the base?
[pickers] Clean the internals and the public API of <PickersPopper />
#16319
Conversation
dde1420
to
431d5d9
Compare
const themeProps = useThemeProps({ | ||
props, | ||
name, | ||
}); | ||
const reduceAnimations = useReduceAnimations(themeProps.reduceAnimations); |
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 unified the behavior of useReduceAnimations
with usePickerOrientation
it now takes the explicit value as a param.
Deploy preview: https://deploy-preview-16319--material-ui-x.netlify.app/ Updated pages: |
c150930
to
5e39ab6
Compare
* Whether the heavy animations should be disabled. | ||
* @default `@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13 | ||
*/ | ||
reduceAnimations?: boolean; |
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.
Not sure if we should name this one with a boolean prefix (shouldReduceAnimations
for instance) or not.
I kept the name of the prop for now.
I added it to the public context because I think it's something people should be able to use, especially for custom views when we will stop drilling it to the view.
5e39ab6
to
d7a750c
Compare
<PickersPopper />
<PickersPopper />
<PickersPopper />
<PickersPopper />
d7a750c
to
1e92a72
Compare
<PickersPopper />
<PickersPopper />
<PickersPopper />
<PickersPopper />
de9cd30
to
fcf345e
Compare
Part of #16175
PickersPopper
=>PickerPopper