UNPKG

piral-menu

Version:

Plugin for the integration of menu items in Piral.

33 lines (32 loc) 808 B
import { ComponentType } from 'react'; import { PiralPlugin } from 'piral-core'; import { PiletMenuApi, MenuSettings } from './types'; export interface InitialMenuItem { /** * The optional menu settings. */ settings?: MenuSettings; /** * The menu component to use. */ component: ComponentType; } /** * Available configuration options for the menu plugin. */ export interface MenuConfig { /** * The initial menu items. * @default [] */ items?: Array<InitialMenuItem>; /** * Sets the default settings to be used. * @default {} */ defaultSettings?: MenuSettings; } /** * Creates new Pilet API extensions for integration of menu items. */ export declare function createMenuApi(config?: MenuConfig): PiralPlugin<PiletMenuApi>;