1 | import * as React from 'react';
|
2 | import { SxProps } from '@mui/system';
|
3 | import { OverridableStringUnion } from '@mui/types';
|
4 | import { Theme } from '..';
|
5 | import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
|
6 | import { OverrideProps } from '../OverridableComponent';
|
7 | import { IconButtonClasses } from './iconButtonClasses';
|
8 |
|
9 | export interface IconButtonPropsColorOverrides {}
|
10 |
|
11 | export interface IconButtonPropsSizeOverrides {}
|
12 |
|
13 | export interface IconButtonOwnProps {
|
14 | |
15 |
|
16 |
|
17 | children?: React.ReactNode;
|
18 | |
19 |
|
20 |
|
21 | classes?: Partial<IconButtonClasses>;
|
22 | |
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | color?: OverridableStringUnion<
|
29 | 'inherit' | 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning',
|
30 | IconButtonPropsColorOverrides
|
31 | >;
|
32 | |
33 |
|
34 |
|
35 |
|
36 | disabled?: boolean;
|
37 | |
38 |
|
39 |
|
40 |
|
41 | disableFocusRipple?: boolean;
|
42 | |
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | edge?: 'start' | 'end' | false;
|
50 | |
51 |
|
52 |
|
53 |
|
54 |
|
55 | size?: OverridableStringUnion<'small' | 'medium' | 'large', IconButtonPropsSizeOverrides>;
|
56 | |
57 |
|
58 |
|
59 | sx?: SxProps<Theme>;
|
60 | }
|
61 |
|
62 | export type IconButtonTypeMap<
|
63 | AdditionalProps = {},
|
64 | RootComponent extends React.ElementType = 'button',
|
65 | > = ExtendButtonBaseTypeMap<{
|
66 | props: AdditionalProps & IconButtonOwnProps;
|
67 | defaultComponent: RootComponent;
|
68 | }>;
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 | declare const IconButton: ExtendButtonBase<IconButtonTypeMap>;
|
84 |
|
85 | export type IconButtonProps<
|
86 | RootComponent extends React.ElementType = IconButtonTypeMap['defaultComponent'],
|
87 | AdditionalProps = {},
|
88 | > = OverrideProps<IconButtonTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
89 | component?: React.ElementType;
|
90 | };
|
91 |
|
92 | export default IconButton;
|