UNPKG

699 BTypeScriptView Raw
1/// <reference types="react" />
2export interface Offset {
3 left: number;
4 top: number;
5}
6/**
7 * Show the given menu element at the given offset from the top-left corner of the viewport.
8 * The menu will appear below-right of this point and will flip to below-left if there is not enough
9 * room onscreen. The optional callback will be invoked when this menu closes.
10 *
11 * @deprecated use ContextMenu2
12 */
13export declare function show(menu: JSX.Element, offset: Offset, onClose?: () => void, isDarkTheme?: boolean): void;
14/** Hide the open context menu. */
15export declare function hide(): void;
16/** Return whether a context menu is currently open. */
17export declare function isOpen(): boolean;