UNPKG

1.24 kBTypeScriptView Raw
1import React from "react";
2interface MenuItem {
3 label: string | JSX.Element;
4 disabled?: boolean;
5 action?: (target?: Range | null) => void;
6 group?: MenuItem[];
7}
8interface contextMenuHandlerProps extends React.HTMLAttributes<HTMLDivElement> {
9 children: JSX.Element[] | JSX.Element;
10 menuItems: MenuItem[];
11 showLowMenu?: boolean;
12}
13export const ContextMenuHandler: {
14 ({ children, menuItems, showLowMenu, ...rest }: contextMenuHandlerProps): JSX.Element;
15 displayName: string;
16};
17interface ContextWindowStackProps {
18 id?: string;
19 minZIndex?: number;
20 children?: JSX.Element[] | JSX.Element;
21}
22export const ContextWindowStack: {
23 ({ minZIndex, children, }: ContextWindowStackProps): JSX.Element;
24 displayName: string;
25};
26interface ContextWindowProps extends React.HTMLAttributes<HTMLDivElement> {
27 id: string;
28 visible: boolean;
29 onOpen?: () => void;
30 onClose?: () => void;
31 title: string;
32 style?: React.CSSProperties;
33 children: JSX.Element[] | JSX.Element | string;
34}
35export const ContextWindow: {
36 ({ id, visible, title, children, onOpen, onClose, ...rest }: ContextWindowProps): JSX.Element;
37 displayName: string;
38};
39
40//# sourceMappingURL=context-menu.d.ts.map