import { default as React } from 'react'; import { SafeExtract, Variant } from '../../types'; import { IconName } from '../Icon/IconName'; import { DropdownButtonListItem } from './DropdownButtonList/DropdownButtonListItem'; import { DropdownButtonTriggerProps } from './DropdownButtonTrigger'; /** @inheritdoc */ export interface DropdownButtonProps extends React.PropsWithChildren> { /** * Variant of the button. * @default 'primary' * */ variant?: SafeExtract; /** * Close the dropdown on action. * Applied to standalone dropdown buttons and all its nested dropdowns. * @default true */ closeOnAction?: boolean; /** * Description of a nested dropdown. * Applied to nested dropdown only. */ description?: string; /** * Icon of a nested dropdown. * Applied to nested dropdown only. */ icon?: IconName; /** * Items of the dropdown. * Only valid children are `DropdownButton.Item`, `DropdownButton` and `Fragment` components. * You can wrap these components into a custom component but it must return only components listed above. */ children?: React.ReactNode; } type DropdownButtonComponent = React.FC & { Item: typeof DropdownButtonListItem; }; /** * Dropdown button component. * It can be used as a standalone dropdown button or as a submenu of another dropdown button. * All the props are applied to standalone dropdown buttons only unless stated otherwise. */ export declare const DropdownButton: DropdownButtonComponent; export {};