diff --git a/docs/data/joy/components/drawer/drawer.md b/docs/data/joy/components/drawer/drawer.md index 804b686d4cf9c5..5905591013c196 100644 --- a/docs/data/joy/components/drawer/drawer.md +++ b/docs/data/joy/components/drawer/drawer.md @@ -27,20 +27,22 @@ It will also close if an item inside of it is selected, which can be controlled ### Anchor Use the anchor prop to specify where the drawer should appear from. +The default value is `left`. {{"demo": "DrawerAnchor.js"}} -### Close button +### Size -Use the Modal Close component to add a close button to the Drawer. +Use the size prop to adjust the Drawer's width and height when positioned left/right and top/bottom, respectively. -{{"demo": "DrawerCloseButton.js"}} +{{"demo": "DrawerSize.js"}} -### Size +### Close button -Use the `size` prop to adjust the Drawer's width. +Use the Modal Close component to add a close button to the Drawer. +It automatically handles the `onClick` event. -{{"demo": "DrawerSize.js"}} +{{"demo": "DrawerCloseButton.js"}} ### Transition @@ -67,6 +69,6 @@ A common use case for the Drawer is mobile menus. ### Inset drawer -To make the Drawer not glued to the edge of the viewport, creating an inset style, use a combination of background and padding values on the Drawer component and either a Box or [Sheet](/joy-ui/react-sheet/) to the full-height wrapper. +To make the Drawer not glued to the edge of the viewport, creating an inset style, use a combination of background and padding values on the Drawer component and either the Box or [Sheet](/joy-ui/react-sheet/) components for the full-height wrapper. {{"demo": "DrawerFilters.js"}}