-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Make MenuTrigger render menus in a Tray on mobile #333
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
Conversation
Build successful! 🎉 |
isOpen | ||
}); | ||
|
||
let isMobile = useMediaQuery('(max-width: 700px)'); |
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.
should we hook up anything to screen resizing? probably not since it'd be unlikely that someone would change the screen size while a menu is open, and i think it closes when you try something like that?
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.
useMediaQuery
does listen for matchMedia
events, so that should already happen. 😄
autoFocus: true, | ||
wrapAround: true | ||
wrapAround: true, | ||
UNSAFE_style: { |
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.
Tray doesn't take care of this already?
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 at the moment. do you think it's safe to do that? wasn't sure if trays could have more than one child or something
Build successful! 🎉 |
Build successful! 🎉 |
This was already implemented in Picker, but not MenuTrigger.