ResourceMenuItem
A sidebar menu entry generated from a resource.
Installation
pnpm dlx shadcn@latest add @chelone/resource-menu-itemA sidebar menu entry generated from a resource.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | Extra CSS class appended to the underlying menu button. |
| icon | ReactNode | — | Override the icon. Defaults to the resource icon or `<List />`. |
| label | ReactNode | — | Override the label. Defaults to the pluralised resource label. |
| name | string | — | The resource name (matches a `<Resource name>` registered in `<Admin>`). Used to look up the definition, label, icon and list path. |
| onClick | () => void | — | Click handler invoked after the default navigation (e.g. close drawer). |
| tooltipProps | Record<string, unknown> | — | Extra props spread onto the underlying `<SidebarMenuButton>`. |