UNPKG

@react-md/menu

Version:

Create menus that auto-position themselves within the viewport and adhere to the accessibility guidelines

28 lines (27 loc) 1.2 kB
import React, { ReactNode } from "react"; import { BaseDropdownMenuProps } from "./DropdownMenu"; import { MenuItemProps } from "./MenuItem"; export interface DropdownMenuItemProps extends Omit<MenuItemProps, "id">, BaseDropdownMenuProps { /** * The icon to show after the children in the button when the `buttonType` is * not set to `"icon"`. */ dropdownIcon?: ReactNode; /** * Boolean if the dropdown icon should be removed from the button. The icon * will always be removed for icon buttons. */ disableDropdownIcon?: boolean; /** * The default behavior of the dropdown menu is to close when the escape key * is pressed. Now that there are multiple nested menus, this will actually * close **all** of them by default. If this is undesired behavior, you can * enable this prop which will make sure only the top-level dropdown menu will * be closed. */ disableEscapeCascade?: boolean; } /** * The `DropdownMenuItem` component is used to be able to render nested dropdown menus. */ export declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLLIElement>>;