/** * Official Type definitions for LemonadeJS plugins * https://lemonadejs.net * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped */ declare function Tabs(el: HTMLElement, options?: Tabs.Options): Tabs.Instance; declare namespace Tabs { interface Item { // Reference to an external DOM el: HTMLElement, /** Material icon keyword */ icon?: string; // Tab header title: string, // HTML template content: string, } interface Options { /** Programmatically content */ data?: Item[]; /** Selected tab */ selected?: number; /** Tabs position */ position?: 'default' | 'center' | 'bottom' | undefined; /** Activate round borders */ round?: boolean; /** Allow to create new tab button */ allowCreate?: boolean; /** Change tabs */ onchange?: (instance: object, value: number) => void; /** On open event */ onopen?: (instance: object, index: number) => void; /** Before create new tab */ onbeforecreate?: (instance: object, item: Item, position: number) => boolean | void; /** On create new tab event */ oncreate?: (instance: object, item: Item, position: number) => void; /** On change tab position event */ onchangeposition: (instance: object, fromIndex: number, toIndex: number) => void; } interface Instance { /** Create a new option */ create: (item: Item, position?: number, select?: boolean) => void; /** Programmatically content */ data: Item[]; /** Selected tab */ selected: number; /** Tabs position */ position?: 'center' | undefined; /** Activate round borders */ round?: boolean; /** Allow to create new tab button */ allowCreate?: boolean; } } export default Tabs;