UNPKG

@patternfly/react-core

Version:

This library provides a set of common React components for use with the PatternFly reference implementation.

60 lines 2.97 kB
import * as React from 'react'; import { DropdownDirection, DropdownPosition } from '../Dropdown'; export interface ApplicationLauncherProps extends React.HTMLProps<HTMLDivElement> { /** Additional element css classes */ className?: string; /** Display menu above or below dropdown toggle */ direction?: DropdownDirection | 'up' | 'down'; /** Array of application launcher items */ items?: React.ReactNode[]; /** Render Application launcher toggle as disabled icon */ isDisabled?: boolean; /** open bool */ isOpen?: boolean; /** Indicates where menu will be alligned horizontally */ position?: DropdownPosition | 'right' | 'left'; /** Function callback called when user selects item */ onSelect?: (event: any) => void; /** Callback called when application launcher toggle is clicked */ onToggle?: (event: MouseEvent | TouchEvent | KeyboardEvent | React.KeyboardEvent<any> | React.MouseEvent<HTMLButtonElement>, isOpen: boolean) => void; /** Adds accessible text to the button. Required for plain buttons */ 'aria-label'?: string; /** Flag to indicate if application launcher has groups */ isGrouped?: boolean; /** Toggle Icon, optional to override the icon used for the toggle */ toggleIcon?: React.ReactNode; /** The container to append the menu to. Defaults to 'inline'. * If your menu is being cut off you can append it to an element higher up the DOM tree. * Some examples: * menuAppendTo="parent" * menuAppendTo={() => document.body} * menuAppendTo={document.getElementById('target')} */ menuAppendTo?: HTMLElement | (() => HTMLElement) | 'inline' | 'parent'; /** ID list of favorited ApplicationLauncherItems */ favorites?: string[]; /** Enables favorites. Callback called when an ApplicationLauncherItem's favorite button is clicked */ onFavorite?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, itemId: string, isFavorite: boolean) => void; /** Enables search. Callback called when text input is entered into search box */ onSearch?: (event: React.FormEvent<HTMLInputElement>, textInput: string) => void; /** Placeholder text for search input */ searchPlaceholderText?: string; /** Text for search input when no results are found */ searchNoResultsText?: string; /** Additional properties for search input */ searchProps?: any; /** Label for the favorites group */ favoritesLabel?: string; /** ID of toggle */ toggleId?: string; /** z-index of the application launcher when menuAppendTo is not inline. */ zIndex?: number; } declare class ApplicationLauncher extends React.Component<ApplicationLauncherProps> { static displayName: string; static defaultProps: ApplicationLauncherProps; createSearchBox: () => React.JSX.Element; render(): React.JSX.Element; } export { ApplicationLauncher }; //# sourceMappingURL=ApplicationLauncher.d.ts.map