UNPKG

@bothub-chat/ui

Version:

Bothub UI Components

36 lines (35 loc) 925 B
import React from 'react'; export interface MenuItem { id: string; label: string | React.ReactNode; height?: 'fit' | 'auto'; icon?: React.ReactElement; } export interface MenuItemButton { type: 'button'; children?: React.ReactNode; description?: string; onClick: () => void; } export interface MenuItemLink { type: 'link'; href: string; height?: 'fit' | 'auto'; description?: string; children?: React.ReactNode; } export interface MenuItemCollapse { type: 'collapse'; columns?: 1 | 2; children: Array<MenuItemChild>; } export type MenuItemChild = (MenuItem & (MenuItemButton | MenuItemLink)) | MenuItemDivider; export interface MenuItemDivider { type: 'divider'; } export type MenuItems = { id: string; label: string | React.ReactNode; children: Array<MenuItemChild | (MenuItem & MenuItemCollapse)>; }; export declare const config: MenuItems[];