-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
[joy-ui][Drawer] Add Drawer component #38169
Conversation
Netlify deploy preview@mui/joy: parsed: +1.17% , gzip: +1.17% Bundle size reportDetails of bundle changes (Toolpad) |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@@ -3,6 +3,8 @@ import { generateUtilityClass, generateUtilityClasses } from '../className'; | |||
export interface ModalClasses { | |||
/** Class name applied to the root element. */ | |||
root: string; | |||
/** Class name applied to the root element when open is false. */ | |||
hidden: string; |
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.
Missing class name
The Drawer can be cancelled by clicking the overlay or pressing the Esc key. | ||
It closes when an item is selected, handled by controlling the `open` prop. | ||
|
||
{{"demo": "DrawerBasic.js", "iframe": true}} |
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.
Does it need to be iframe given that other demos are not? cc @zanivan
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 will change this demo to be similar to the others, I wanted to make it closer to showcase how it would look like in app, but it complicates things in the code itself - the usage of the document object etc.
Sorry for the delay. Here are some answers:
Fixed, I must have broken this when I was removing the
I simplified this demo, no need for iframe, it complicates things when exporting to sandbox too.
It's possible by clicking on some of the items. In practise, I wouldn't expect that someone would use large drawer on a mobile? |
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 🚀
I added support for this by setting the width to |
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.
🚀🚀🚀
Thanks @siriwatknp , @mnajdova and @zanivan for your hard and meticulous work! |
Great work. I have a question. When will it be available via npm? Thanks |
Likely later today with the latest release :) |
closes #36292
Adding Drawer related components in Joy UI. I started with adding a
Drawer
component - which is the equivalent of the temporary drawer in Material UI. I decided not to add thepermanent
variant version, because in my opinion, these two versions of the component are too different to justify them being bundled in one component - if developers need a permanent drawer, why bundle all the modal-related code with it?After this PR: