/** * Official Type definitions for LemonadeJS plugins * https://lemonadejs.net */ declare function Topmenu(el: HTMLElement, options?: Topmenu.Options): Topmenu.Instance; declare namespace Topmenu { interface Items { /** Context menu item type: line | divisor | default */ type?: 'line' | 'divisor' | 'default'; /** Context menu item title */ title: string; /** Context menu icon key. (Material icon key icon identification) */ icon?: string; /** HTML id property of the item DOM element */ id?: string; /** Item is disabled */ disabled?: boolean; /** Onclick event for the contextmenu item */ onclick?: (instance: object, e: MouseEvent) => void; /** A short description or instruction for the item. Normally a shortcut. Ex. CTRL + C */ shortcut?: string; /** Show this text when the user mouse over the element */ tooltip?: string; /** Submenu */ submenu?: Items[]; } interface OptionItem { /** Option title */ title: string; /** Submenu */ submenu?: Items[]; } interface Options { /** Items for the contextmenu */ options: OptionItem[], } interface Instance { /** Items for the contextmenu */ options: OptionItem[], /** Open menu. Default 0 */ open: (menuIndex?: number) => void; } } export default Topmenu;