Expanded MenuItem Icon
The expandedMenuItemIcon
prop allows customization of the icon for expanded submenu items.
Propsโ
type RenderExpandedMenuItemIcon = {
icon:
| ReactElement
| ((params: { level?: number; active?: boolean; disabled?: boolean }) => ReactElement | null)
| null
level?: number
}
type renderExpandedMenuItemIcon?: RenderExpandedMenuItemIcon
Basicโ
This example demonstrates using a ReactElement as the icon.
Exampleโ
/vertical-menu/menu/expanded-menu-item-icon/basic
Source Codeโ
Icon With Levelโ
This example shows using a ReactElement as the icon and passing the level parameter.
Exampleโ
/vertical-menu/menu/expanded-menu-item-icon/icon-with-level
Source Codeโ
Icon With Paramsโ
This example uses a function as the icon
Exampleโ
/vertical-menu/menu/expanded-menu-item-icon/icon-with-param
Source Codeโ
Icon With Params Levelโ
This example utilizes a function as the icon and passes the level parameter.
Exampleโ
/vertical-menu/menu/expanded-menu-item-icon/icon-with-param-level
Source Codeโ