Skip to content
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

Add nav item props to shared props #843

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions docs/src/shared/markdown/SharedProps.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Box from '@mui/material/Box';

## Shared Props
## Drawer Shared Props

The following props can be set at any level in the drawer hierarchy ([`<Drawer>`](/components/drawer/api-docs), [`<DrawerBody>`](/components/drawer-body/api-docs), [`<DrawerNavGroup>`](/components/drawer-nav-group/api-docs), [`<DrawerNavItem>`](/components/drawer-nav-item/api-docs), or [`<DrawerRailItem>`](/components/drawer-rail-item/api-docs)). If they are set on a parent, they will be used for all children. For more customization, you can set these props on individual children and they will override any value set on the parent.

<Box id='shared-props'>
<Box id='drawer-shared-props'>

| Name | Description | Type | Required | Default |
| :------------------------ | :-------------------------------------------------------- | :-------- | :------- | :-------------------------- |
Expand All @@ -18,3 +18,21 @@ The following props can be set at any level in the drawer hierarchy ([`<Drawer>`
| ripple | Whether to apply material ripple effect to items on click | `boolean` | no | true |

</Box>

## Drawer Nav Item Props

<Box id='drawer-nav-item-props'>

| Name | Description | Type | Required | Default |
| :---------------------------- | :----------------------------------------------------------------------------- | :---------------------- | :------- | :------------------------------- |
| activeItemBackgroundShape | Shape of the active item background | `'round'` \| `'square'` | no | `square` |
| chevron | Whether to have chevrons for all menu items | `boolean` | no | `false` |
| chevronColor | Color override for the chevron icon | `string` | no | `varies for light/dark theme` |
| collapseIcon | Icon used to collapse nav group | `JSX.Element` | no | `expandIcon rotated 180 degrees` |
| expandIcon | Icon used to expand nav group | `JSX.Element` | no | |
| hidePadding | Whether to hide the paddings reserved for menu item icons | `boolean` | no | `false` |
| disableActiveItemParentStyles | Disables the semi-bold style on parent elements in the selected item hierarchy | `boolean` | no | `false` |
| nestedBackgroundColor | Background color for a nested section of menu items | `string` | no | `varies for light/dark theme` |
| nestedDivider | Whether to apply a dividing line under nested navigation items | `boolean` | no | `false` |

</Box>
Loading