@viacast/react-contexify
Version:
Add contextmenu to your react component with ease
11 lines (10 loc) • 312 B
TypeScript
export interface RefTrackerValue {
node: HTMLElement;
isSubmenu: boolean;
submenuRefTracker?: RefTracker;
}
export declare type RefTracker = ReturnType<typeof useRefTracker>;
/**
* Used to store children refs
*/
export declare function useRefTracker(): Map<HTMLElement, RefTrackerValue>;