UNPKG

2.32 kBTypeScriptView Raw
1import * as React from 'react';
2import { DropdownDirection, DropdownPosition } from '../Dropdown';
3import { ToggleMenuBaseProps } from '../../helpers/Popper/Popper';
4export interface ApplicationLauncherProps extends ToggleMenuBaseProps, React.HTMLProps<HTMLDivElement> {
5 /** Additional element css classes */
6 className?: string;
7 /** Display menu above or below dropdown toggle */
8 direction?: DropdownDirection | 'up' | 'down';
9 /** Array of application launcher items */
10 items?: React.ReactNode[];
11 /** Render Application launcher toggle as disabled icon */
12 isDisabled?: boolean;
13 /** open bool */
14 isOpen?: boolean;
15 /** Indicates where menu will be alligned horizontally */
16 position?: DropdownPosition | 'right' | 'left';
17 /** Function callback called when user selects item */
18 onSelect?: (event: any) => void;
19 /** Callback called when application launcher toggle is clicked */
20 onToggle?: (value: boolean) => void;
21 /** Adds accessible text to the button. Required for plain buttons */
22 'aria-label'?: string;
23 /** Flag to indicate if application launcher has groups */
24 isGrouped?: boolean;
25 /** Toggle Icon, optional to override the icon used for the toggle */
26 toggleIcon?: React.ReactNode;
27 /** ID list of favorited ApplicationLauncherItems */
28 favorites?: string[];
29 /** Enables favorites. Callback called when an ApplicationLauncherItem's favorite button is clicked */
30 onFavorite?: (itemId: string, isFavorite: boolean) => void;
31 /** Enables search. Callback called when text input is entered into search box */
32 onSearch?: (textInput: string) => void;
33 /** Placeholder text for search input */
34 searchPlaceholderText?: string;
35 /** Text for search input when no results are found */
36 searchNoResultsText?: string;
37 /** Additional properties for search input */
38 searchProps?: any;
39 /** Label for the favorites group */
40 favoritesLabel?: string;
41 /** ID of toggle */
42 toggleId?: string;
43}
44export declare class ApplicationLauncher extends React.Component<ApplicationLauncherProps> {
45 static displayName: string;
46 static defaultProps: ApplicationLauncherProps;
47 createSearchBox: () => JSX.Element;
48 render(): JSX.Element;
49}
50//# sourceMappingURL=ApplicationLauncher.d.ts.map
\No newline at end of file