File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1+ export { useContextMenu } from './use-context-menu' ;
2+ export type { ContextMenuItem } from './types' ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export type ContextMenuContext = {
1515 close ( ) : void ;
1616} ;
1717
18- export type MenuItem = {
18+ export type ContextMenuItem = {
1919 label : string ;
2020 onAction : ( event : React . KeyboardEvent | React . MouseEvent ) => void ;
2121} ;
Original file line number Diff line number Diff line change 11import React , { useContext , useMemo , useRef } from 'react' ;
22import { Context } from './context-menu-provider' ;
33import { appendContextMenuContent } from './context-menu-content' ;
4- import type { MenuItem } from './types' ;
4+ import type { ContextMenuItem } from './types' ;
55
6- export type ContextMenuMethods < T extends MenuItem > = {
6+ export type ContextMenuMethods < T extends ContextMenuItem > = {
77 /**
88 * Close the context menu.
99 */
@@ -15,7 +15,7 @@ export type ContextMenuMethods<T extends MenuItem> = {
1515 registerItems : ( items : T [ ] ) => ( trigger : HTMLElement | null ) => void ;
1616} ;
1717
18- export function useContextMenu < T extends MenuItem > ( {
18+ export function useContextMenu < T extends ContextMenuItem > ( {
1919 Menu,
2020} : {
2121 Menu : React . ComponentType < {
You can’t perform that action at this time.
0 commit comments