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 = {
15
15
close ( ) : void ;
16
16
} ;
17
17
18
- export type MenuItem = {
18
+ export type ContextMenuItem = {
19
19
label : string ;
20
20
onAction : ( event : React . KeyboardEvent | React . MouseEvent ) => void ;
21
21
} ;
Original file line number Diff line number Diff line change 1
1
import React , { useContext , useMemo , useRef } from 'react' ;
2
2
import { Context } from './context-menu-provider' ;
3
3
import { appendContextMenuContent } from './context-menu-content' ;
4
- import type { MenuItem } from './types' ;
4
+ import type { ContextMenuItem } from './types' ;
5
5
6
- export type ContextMenuMethods < T extends MenuItem > = {
6
+ export type ContextMenuMethods < T extends ContextMenuItem > = {
7
7
/**
8
8
* Close the context menu.
9
9
*/
@@ -15,7 +15,7 @@ export type ContextMenuMethods<T extends MenuItem> = {
15
15
registerItems : ( items : T [ ] ) => ( trigger : HTMLElement | null ) => void ;
16
16
} ;
17
17
18
- export function useContextMenu < T extends MenuItem > ( {
18
+ export function useContextMenu < T extends ContextMenuItem > ( {
19
19
Menu,
20
20
} : {
21
21
Menu : React . ComponentType < {
You can’t perform that action at this time.
0 commit comments