import * as React from "react"; import { ControllerStateAndHelpers } from "downshift"; import { DropdownSectionProps } from "./DropdownSection"; import { DropdownMenuItemProps } from "./DropdownMenuItem"; import { Direction } from "../../dropdownable/components/Dropdownable"; export interface DropdownMenuProps { /** * Groups of dropdown menu items */ children: React.ReactElement | Array>; /** * Whether the dropdown starts open */ initialIsOpen?: boolean; /** * Maximum height the menu can grow to. Can accept any number value and it will add `px` or any valid maxHeight value including vh, ems, or rems. */ menuMaxHeight?: React.CSSProperties["maxHeight"]; /** * Maximum width the menu can grow to. Can accept any number value and it will add `px` or any valid maxWidth value including vw, ems, or rems. */ menuMaxWidth?: React.CSSProperties["maxWidth"]; /** * Callback for when a menu item is clicked */ onSelect?: (selectedItem: string, stateAndHelpers?: ControllerStateAndHelpers>) => void; /** * Which DOM node the dropdown menu will attach to */ overlayRoot?: HTMLElement; /** * The preferred direction to open the menu in relation to the trigger */ preferredDirections?: Direction[]; /** * The node that opens the menu when clicked */ trigger: React.ReactNode; /** * Whether the dropdown node should be portalled to document.body, or open in it's parent DOM node */ disablePortal?: boolean; /** * Allows custom styling */ className?: string; /** * Human-readable selector used for writing tests */ "data-cy"?: string; } declare const DropdownMenu: (props: DropdownMenuProps) => React.JSX.Element; export default DropdownMenu;