import type { FC, MouseEvent } from "react"; import type { MenuItemModel } from "../../menus"; import type { MenuItemProps } from "../MenuItem"; /** * Properties for the `BoundMenu` component. */ export interface BoundMenuItemProps extends Omit { /** * The menu item. */ item: MenuItemModel; /** * Invoked when the menu item is clicked, before executing the action. If * the callback returns the value false, then the command won't execute. */ onClick?: (e: MouseEvent, item: MenuItemModel) => boolean | void; /** * Invoked when the action has completed. */ onCompleted?: (item: MenuItemModel) => void; /** * Invoked when the action is canceled. */ onCancelled?: (error: Error) => void; /** * Whether or not to show the description inline, or as a tooltip. Default * is `true`. No effect if `showTitle` is `false`. */ showDescription?: boolean; /** * Whether or not to show the title. Hiding the title can be useful for an * icon-only menu, like a toolbar. Defaults to `true`. */ showTitle?: boolean; /** * Whether or not to show the icon, if one exists for the item. Defaults to * `true`. */ showIcon?: boolean; } /** * A menu item that is bound to a MenuItemModel. */ declare const BoundMenuItem: FC; export default BoundMenuItem;