import { ControllerStateAndHelpers } from 'downshift'; import { Item } from './types'; interface Props { /** Fit the width to its parent width when it is `true`. * For Dropdown with cascading menu, `block` is only applied to the top-level menu. * See **Block with cascading menu** example below. */ block?: boolean; /** Pop menu items */ items: Item[]; /** The currently selected item */ selectedItem?: Item; /** A boolean which control to show a checked icon next to the selected item */ checkSelectedItem?: boolean; /** Callback function, to be executed when user selected an item and it has changed */ onChange?: (_selectedItem: Item | null) => void; /** Callback function, to be executed when user selected an item */ onSelect?: (_selectedItem: Item | null) => void; /** Callback function, to be executed when user clicked outside of pop menu */ onOuterClick?: (_: ControllerStateAndHelpers) => void; /** Callback function, to be executed when user toggled the pop menu */ onToggle?: (_isOpen: boolean, _args: { selectedItem: Item; }) => void; /** Label of the component, will be shown before user selected option */ defaultLabel?: string; /** Open direction of pop menu */ direction?: 'left' | 'right' | 'auto'; /** Variant of component, `default` is the component with standard select button; * `compact` is the component with icon-only button */ variant?: 'default' | 'compact'; /** Custom icon for the Dropdown button, if not supplied default icon will be used: * (`v`) icon on `default` variant and (**⋮**) icon on `compact` variant */ icon?: JSX.Element; /** A boolean which, if true, disables the Dropdown */ disabled?: boolean; /** injected by with theme, used to handle key down for auto direction and rtl */ theme?: { rtl: boolean; }; /** A custom string to replace the label, if not supplied selectedItems will be used */ customLabel?: string; /** A boolean which, if true, the Dropdown will become scrollable */ scroll?: boolean; /** A list size of the menu */ listSize?: 'default' | 'intrinsic' | 'fixed' | 'parent'; /** Rest Props */ [rest: string]: any; } declare const Dropdown: ({ scroll, ...props }: Props) => import("@emotion/react/jsx-runtime").JSX.Element; export default Dropdown;