UNPKG

@storybook/design-system

Version:
37 lines 1.02 kB
declare type SetMenuOpenStateById = (args: { id: string; isOpen: boolean; }) => void; export declare enum ItemType { MENU = "menu", LINK = "link", BULLET_LINK = "bullet-link" } export interface Item { title: string; type: ItemType; path?: string; children?: Item[]; } export interface ItemWithId extends Item { id: string; } export interface ItemWithStateAndId extends ItemWithId { isOpen?: boolean; children: ItemWithStateAndId[]; } export interface TableOfContentsItemsProps { className?: string; currentPath: string; isTopLevel: boolean; items: ItemWithStateAndId[]; setMenuOpenStateById?: SetMenuOpenStateById; } export declare function TableOfContentsItems({ className, currentPath, isTopLevel, items, setMenuOpenStateById, ...rest }: TableOfContentsItemsProps): JSX.Element; export declare namespace TableOfContentsItems { var defaultProps: { className: string; }; } export {}; //# sourceMappingURL=TableOfContentsItems.d.ts.map