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