/// import * as React from "react"; import { AbstractPureComponent } from "../../common/abstractPureComponent"; import { IOverlayLifecycleProps } from "../overlay/overlay"; export interface IOffset { left: number; top: number; } export interface IContextMenuProps extends IOverlayLifecycleProps { menu?: JSX.Element | null; usePortal?: boolean; onClose?: () => void; isDarkTheme?: boolean; isOpen?: boolean; offset?: IOffset; } export declare class ControlledContextMenu extends AbstractPureComponent { private portalElement; constructor(props: IContextMenuProps); componentWillUnmount(): void; render(): React.ReactPortal; private cancelContextMenu; private handleBackdropContextMenu; } /** * Show the given menu element at the given offset from the top-left corner of the viewport. * The menu will appear below-right of this point and will flip to below-left if there is not enough * room onscreen. The optional callback will be invoked when this menu closes. */ export declare function show(menu: JSX.Element, offset: IOffset, onClose?: () => void, isDarkTheme?: boolean): void; /** Hide the open context menu. */ export declare function hide(): void; /** Return whether a context menu is currently open. */ export declare function isOpen(): boolean;