import React from "react"; import { ValidIconName } from "../Icon/canonicalIconNames"; import { IconButtonProps } from "../Icon/IconButton"; import { TestableComponent } from "../interfaces"; import { ContextOverlayProps } from "./ContextOverlay"; export interface ContextMenuProps extends TestableComponent { /** * Addional CSS class names. */ className?: string; /** * The elements of the context menu. * They will be wrapped in a `Menu` element automatically. */ children?: React.JSX.Element | React.JSX.Element[]; /** * Toggler that need to be used to display menu. * If a valid icon name is used then the icon element is displayed. * In this case `togglerText`, `togglerLarge` and `tooltipAsTitle` are used, too. */ togglerElement?: ValidIconName | React.JSX.Element; /** * Text displayed as title or tooltip on toggler element. */ togglerText?: string; /** * Allow to de- and increase the size of the default toggler button. */ togglerSize?: IconButtonProps["size"]; /** * Toggler element is displayed larger than normal. * @deprecated (v27) use `togglerSize="large" instead */ togglerLarge?: boolean; /** * Tooltip on toggler element is display as HTML title, not as extra tooltip element. */ tooltipAsTitle?: boolean; /** * Props to spread to `ContextOverlay` that is used to display the dropdown. */ contextOverlayProps?: Partial>; /** * Disables the button to open the menu. */ disabled?: boolean; /** * We use the target as placeholder before the real ` React.JSX.Element; export default ContextMenu;