1 |
|
2 | import { EventHandlers } from '../utils/types';
|
3 | import { UseButtonRootSlotProps } from '../useButton';
|
4 | interface UseMenuItemRootSlotOwnProps {
|
5 | role: 'menuitem';
|
6 | tabIndex?: number;
|
7 | id?: string;
|
8 | }
|
9 | export interface MenuItemMetadata {
|
10 | id: string;
|
11 | disabled: boolean;
|
12 | label?: string;
|
13 | ref: React.RefObject<HTMLElement>;
|
14 | }
|
15 | export type UseMenuItemRootSlotProps<TOther = {}> = TOther & UseMenuItemRootSlotOwnProps & UseButtonRootSlotProps<TOther>;
|
16 | export interface UseMenuItemParameters {
|
17 | disabled?: boolean;
|
18 | id?: string;
|
19 | onClick?: React.MouseEventHandler<any>;
|
20 | rootRef: React.Ref<Element>;
|
21 | label?: string;
|
22 | }
|
23 | export interface UseMenuItemReturnValue {
|
24 | |
25 |
|
26 |
|
27 |
|
28 |
|
29 | getRootProps: <TOther extends EventHandlers = {}>(otherHandlers?: TOther) => UseMenuItemRootSlotProps<TOther>;
|
30 | |
31 |
|
32 |
|
33 | disabled: boolean;
|
34 | |
35 |
|
36 |
|
37 | focusVisible: boolean;
|
38 | |
39 |
|
40 |
|
41 | highlighted: boolean;
|
42 | |
43 |
|
44 |
|
45 | index: number;
|
46 | |
47 |
|
48 |
|
49 | rootRef: React.RefCallback<Element> | null;
|
50 | |
51 |
|
52 |
|
53 | totalItemCount: number;
|
54 | }
|
55 | export {};
|