1 | import * as React from 'react';
|
2 | import { Simplify } from '@mui/types';
|
3 | import { PolymorphicProps, SlotComponentProps } from '../utils';
|
4 | import { UseMenuItemRootSlotProps } from '../useMenuItem';
|
5 | export interface MenuItemRootSlotPropsOverrides {
|
6 | }
|
7 | export type MenuItemOwnerState = Simplify<MenuItemOwnProps & {
|
8 | disabled: boolean;
|
9 | focusVisible: boolean;
|
10 | highlighted: boolean;
|
11 | }>;
|
12 | export interface MenuItemOwnProps {
|
13 | children?: React.ReactNode;
|
14 | className?: string;
|
15 | onClick?: React.MouseEventHandler<HTMLElement>;
|
16 | |
17 |
|
18 |
|
19 |
|
20 | disabled?: boolean;
|
21 | |
22 |
|
23 |
|
24 |
|
25 |
|
26 | slots?: MenuItemSlots;
|
27 | |
28 |
|
29 |
|
30 |
|
31 | slotProps?: {
|
32 | root?: SlotComponentProps<'li', MenuItemRootSlotPropsOverrides, MenuItemOwnerState>;
|
33 | };
|
34 | |
35 |
|
36 |
|
37 |
|
38 | label?: string;
|
39 | |
40 |
|
41 |
|
42 |
|
43 |
|
44 | disableFocusOnHover?: boolean;
|
45 | }
|
46 | export interface MenuItemSlots {
|
47 | |
48 |
|
49 |
|
50 |
|
51 | root?: React.ElementType;
|
52 | }
|
53 | export interface MenuItemTypeMap<AdditionalProps = {}, RootComponentType extends React.ElementType = 'li'> {
|
54 | props: MenuItemOwnProps & AdditionalProps;
|
55 | defaultComponent: RootComponentType;
|
56 | }
|
57 | export type MenuItemProps<RootComponentType extends React.ElementType = MenuItemTypeMap['defaultComponent']> = PolymorphicProps<MenuItemTypeMap<{}, RootComponentType>, RootComponentType>;
|
58 | export interface MenuItemState {
|
59 | disabled: boolean;
|
60 | highlighted: boolean;
|
61 | }
|
62 | export type MenuItemRootSlotProps = Simplify<UseMenuItemRootSlotProps & {
|
63 | children?: React.ReactNode;
|
64 | className: string;
|
65 | ref: React.Ref<HTMLElement>;
|
66 | ownerState: MenuItemOwnerState;
|
67 | }>;
|