UNPKG

@trycourier/courier-ui-inbox

Version:

Inbox components for the Courier web UI

36 lines (35 loc) 1.42 kB
import { CourierBaseElement } from '@trycourier/courier-ui-core'; import { CourierInboxThemeManager } from '../types/courier-inbox-theme-manager'; import { CourierInboxHeaderMenuItemId } from './courier-inbox-header'; import { CourierInboxIconTheme } from '../types/courier-inbox-theme'; export type CourierInboxMenuOptionType = 'filters' | 'actions'; export type CourierInboxMenuOption = { id: CourierInboxHeaderMenuItemId; text: string; icon: CourierInboxIconTheme; selectionIcon?: CourierInboxIconTheme | null; onClick: (option: CourierInboxMenuOption) => void; }; export declare class CourierInboxOptionMenu extends CourierBaseElement { static get id(): string; private _themeSubscription; private _type; private _selectedIndex; private _options; private _selectable; private _onMenuOpen; private _menuButton?; private _menu?; private _style?; constructor(themeManager: CourierInboxThemeManager, type: CourierInboxMenuOptionType, selectable: boolean, options: CourierInboxMenuOption[], onMenuOpen: () => void); onComponentMounted(): void; onComponentUnmounted(): void; private getStyles; private refreshTheme; setOptions(options: CourierInboxMenuOption[]): void; private refreshMenuItems; private toggleMenu; private handleOutsideClick; closeMenu(): void; selectOption(option: CourierInboxMenuOption): void; }