import { default as React } from 'react'; import { VALID_ICON_NAMES } from '../icons/iconNames'; import { MenuButtonItemProps } from './MenuButtonItem'; import { Placement } from '../hooks/useDropdownLayer'; import { IconName } from '../types/Icon.types'; export { VALID_ICON_NAMES }; export declare const labelToItemId: (label: string) => string; type MenuItemElement = React.ReactElement; export interface MenuButtonProps { /** * Accessible label for the menu trigger (e.g. "Transaction Actions"). * Backs the trigger's `aria-label`; if omitted, it falls back to "Menu". */ label?: string; /** Optional value for `data-testid` attribute */ testId?: string; /** Name of NDS icon to use as a trigger */ triggerIcon?: IconName; /** * The root node of JSX passed in acts as the menu trigger. * * @deprecated use `renderTrigger` instead. */ trigger?: React.ReactNode; /** * Render function for rendering a custom trigger element. * Called with `(isOpen)`, the open state of the menu. */ renderTrigger?: (isOpen: boolean) => React.ReactNode; /** MenuButton.Item children */ children?: React.ReactNode; /** * If true, a caret indicator is rendered as the end icon * within the trigger. The icon will change direction when * the expanded state of the menulist changes. */ showDropdownIndicator?: boolean; /** Sets preferred side of the trigger the tooltip should appear */ side?: Placement; /** Optional footer content to render below the menu items */ footerItem?: MenuItemElement; } /** * Keyboard navigable popover menu following the * [WIA-ARIA "MenuButton" pattern](https://www.w3.org/TR/wai-aria-practices-1.2/#menubutton). */ declare const MenuButton: { ({ label, testId, trigger, renderTrigger, triggerIcon, showDropdownIndicator, side, children, footerItem, }: MenuButtonProps): React.JSX.Element; Item: { ({ label, startIcon, endIcon, onSelect, }: MenuButtonItemProps): React.JSX.Element; propTypes: { label: import('prop-types').Validator; onSelect: import('prop-types').Validator<(...args: any[]) => any>; startIcon: import('prop-types').Requireable; endIcon: import('prop-types').Requireable; }; displayName: string; }; }; export default MenuButton; //# sourceMappingURL=index.d.ts.map