@furystack/shades-common-components
Version:
Common UI components for FuryStack Shades
27 lines • 750 B
TypeScript
/**
* Type definitions for Menu and Dropdown items
*/
export type MenuItemEntry = {
type?: 'item';
key: string;
label: string | JSX.Element;
icon?: JSX.Element;
disabled?: boolean;
};
export type MenuGroupEntry = {
type: 'group';
key: string;
label: string;
children: MenuEntry[];
};
export type MenuDividerEntry = {
type: 'divider';
key?: string;
};
export type MenuEntry = MenuItemEntry | MenuGroupEntry | MenuDividerEntry;
export type MenuMode = 'vertical' | 'horizontal' | 'inline';
/**
* Returns a flat list of navigable (non-divider, non-disabled) item keys from the menu entries
*/
export declare const getNavigableKeys: (items: MenuEntry[]) => string[];
//# sourceMappingURL=menu-types.d.ts.map