UNPKG

@cute-dw/core

Version:

This TypeScript library is the main part of a more powerfull package designed for the fast WEB software development. The cornerstone of the library is the **DataStore** class, which might be useful when you need a full control of the data, but do not need

39 lines (38 loc) 1.28 kB
import { Consumer } from "../function/Consumer"; import { Predicate } from "../function/Predicate"; import { ToolbarItem } from "./ToolbarItem"; /** * Menu Item interface is used for items in a drop-down or cascading menu */ export interface MenuItem { /** Item label */ label: string; /** Item unique identifier */ id?: string | number; /** Item short description */ microhelp?: string; /** Icon ligature */ icon?: string; /** Icon color */ iconColor?: string; /** Router link */ routerLink?: string | string[]; /** Submenu items */ children?: MenuItem[]; /** Is item enabled? Default true */ enabled?: Predicate<MenuItem> | boolean; /** Is item visible? Default true */ visible?: Predicate<MenuItem> | boolean; /** Is item checked? Default false */ checked?: Predicate<MenuItem> | boolean; /** Is item default? */ default?: Predicate<MenuItem> | boolean; /** Item is clicked (selected or unselected) */ clicked?: Consumer<MenuItem>; /** Item selected using the arrow keys or the mouse */ selected?: Consumer<MenuItem>; /** Toolbar's item definition */ toolBarItem?: ToolbarItem; /** Any cargo data for item */ tag?: any; }