UNPKG

@nexusui/components

Version:

These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.

54 lines (53 loc) 2.14 kB
import { ReactNode } from 'react'; import { ListProps } from '@mui/material/List'; import { ListItemButtonProps } from '@mui/material/ListItemButton'; import { IDrawerNavItem } from '../../type'; export interface IDrawerSection extends ListProps { /** * The header content of the DrawerSection. */ header?: ReactNode; /** * If true, the DrawerSection will be collapsible, and a collapsible arrow will be displayed to the right of the header. * @default false */ collapsible?: boolean; /** * If true, the DrawerSection will be expanded initially, otherwise it will be collapsed. * @default false */ startExpanded?: boolean; /** * Sets the style mode of the List component within the DrawerSection. * @default 'mui' */ styleMode?: 'mui' | 'nexus'; /** * If true, a divider will be shown below the DrawerSection. * @default false */ divider?: boolean; /** * An array of objects that represent items in the list. * * ``` * export interface IDrawerNavItem { * nodeId: string; // The unique identifier for the navigation item. * label?: ReactNode; // The label content for the navigation item. * icon?: ReactNode; // The icon component to display next to the label for the navigation item. * action?: ReactNode; // Custom component to display on the right side of the navigation item. * disabled?: Boolean; // Indicates that the navigation item is disabled. * onNavItemClick?: (node: IDrawerNavItem) => void; // Callback function triggered when the navigation item is clicked. * items?: IDrawerNavItem[]; // The navigation items nested under this item. * [key: string]: any; * }; * * ``` */ items?: ReadonlyArray<IDrawerNavItem>; /** * Props applied to the MUI [ListItemButton](https://mui.com/material-ui/api/list-item-button/) component within the DrawerSection. */ ListItemButtonProps?: ListItemButtonProps; } export declare const DrawerSection: (props: IDrawerSection) => import("react/jsx-runtime").JSX.Element;