1 | /// <reference types="react" />
|
2 | import { SlotComponentProps } from '../utils/types';
|
3 | export interface MenuButtonRootSlotPropsOverrides {
|
4 | }
|
5 | export interface MenuButtonProps {
|
6 | children?: React.ReactNode;
|
7 | /**
|
8 | * Class name applied to the root element.
|
9 | */
|
10 | className?: string;
|
11 | /**
|
12 | * If `true`, the component is disabled.
|
13 | * @default false
|
14 | */
|
15 | disabled?: boolean;
|
16 | /**
|
17 | * If `true`, allows a disabled button to receive focus.
|
18 | * @default false
|
19 | */
|
20 | focusableWhenDisabled?: boolean;
|
21 | /**
|
22 | * Label of the button
|
23 | */
|
24 | label?: string;
|
25 | /**
|
26 | * The props used for each slot inside the MenuButton.
|
27 | * @default {}
|
28 | */
|
29 | slots?: MenuButtonSlots;
|
30 | /**
|
31 | * The components used for each slot inside the MenuButton.
|
32 | * Either a string to use a HTML element or a component.
|
33 | * @default {}
|
34 | */
|
35 | slotProps?: {
|
36 | root?: SlotComponentProps<'button', MenuButtonRootSlotPropsOverrides, MenuButtonOwnerState>;
|
37 | };
|
38 | }
|
39 | export interface MenuButtonSlots {
|
40 | /**
|
41 | * The component that renders the root.
|
42 | * @default 'button'
|
43 | */
|
44 | root?: React.ElementType;
|
45 | }
|
46 | export type MenuButtonOwnerState = MenuButtonProps & {
|
47 | active: boolean;
|
48 | focusableWhenDisabled: boolean;
|
49 | open: boolean;
|
50 | };
|