UNPKG

@trellixio/roaster-coffee

Version:
36 lines 1.31 kB
import * as React from 'react'; import { ForwardRefWithStaticComponents } from '@/types'; import { Section } from './components/Section'; import { Menu } from './components/Menu'; import { MenuItemProps } from './components/MenuItem'; export interface SidebarItemProps extends MenuItemProps<any> { /** The path of the menu entry. */ pathname?: string; /** The list of submenu items. */ subMenu?: SidebarItemProps[]; } export interface SidebarProps { /** The Sidebar header. */ header?: React.ReactNode; /** The Sidebar footer. */ footer?: React.ReactNode; /** The default active path */ activePath?: string; /** The content to display along with the Burger icon button on mobile when the sibar is collapsed. */ mobileHeader?: React.ReactNode; /** The list of menu items. */ items: SidebarItemProps[]; /** Called when a menu item is clicked. */ onMenuItemClick?: ({ itemId }: { itemId: string; }) => void; /** Additional CSS classes added to the Sidebar root element */ className?: string; } declare type SidebarComponent = ForwardRefWithStaticComponents<SidebarProps, { Section: typeof Section; Menu: typeof Menu; }>; export declare const Sidebar: SidebarComponent; export {}; //# sourceMappingURL=Sidebar.d.ts.map