UNPKG

@gamesberry/karmyc-core

Version:

A flexible and powerful layout management system for React applications

23 lines (22 loc) 704 B
import React from 'react'; import { ContextMenuItem } from '../core/types/context-menu-types'; /** * Hook for managing the context menu * Provides simplified functions to open and close the context menu */ export declare const useContextMenu: () => { isVisible: boolean; position: import("../core/types/context-menu-types").IContextMenuPosition; open: (params: { position: { x: number; y: number; }; items: ContextMenuItem[] | React.ReactNode; targetId?: string; metadata?: Record<string, any>; menuClassName?: string; menuType?: "default" | "switchType" | "custom"; }) => void; close: () => void; };