1 | import { PropTypes } from '..';
|
2 | import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
|
3 | import { OverrideProps } from '../OverridableComponent';
|
4 |
|
5 | export type ButtonTypeMap<
|
6 | P = {},
|
7 | D extends React.ElementType = 'button'
|
8 | > = ExtendButtonBaseTypeMap<{
|
9 | props: P & {
|
10 | |
11 |
|
12 |
|
13 | children?: React.ReactNode;
|
14 | |
15 |
|
16 |
|
17 | color?: PropTypes.Color;
|
18 | |
19 |
|
20 |
|
21 | disabled?: boolean;
|
22 | |
23 |
|
24 |
|
25 | disableElevation?: boolean;
|
26 | |
27 |
|
28 |
|
29 | disableFocusRipple?: boolean;
|
30 | |
31 |
|
32 |
|
33 | endIcon?: React.ReactNode;
|
34 | |
35 |
|
36 |
|
37 | fullWidth?: boolean;
|
38 | |
39 |
|
40 |
|
41 |
|
42 | href?: string;
|
43 | |
44 |
|
45 |
|
46 |
|
47 | size?: 'small' | 'medium' | 'large';
|
48 | |
49 |
|
50 |
|
51 | startIcon?: React.ReactNode;
|
52 | |
53 |
|
54 |
|
55 | variant?: 'text' | 'outlined' | 'contained';
|
56 | };
|
57 | defaultComponent: D;
|
58 | classKey: ButtonClassKey;
|
59 | }>;
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 | declare const Button: ExtendButtonBase<ButtonTypeMap>;
|
74 |
|
75 | export type ButtonProps<
|
76 | D extends React.ElementType = ButtonTypeMap['defaultComponent'],
|
77 | P = {}
|
78 | > = OverrideProps<ButtonTypeMap<P, D>, D>;
|
79 |
|
80 | export type ButtonClassKey =
|
81 | | 'root'
|
82 | | 'label'
|
83 | | 'text'
|
84 | | 'textPrimary'
|
85 | | 'textSecondary'
|
86 | | 'outlined'
|
87 | | 'outlinedPrimary'
|
88 | | 'outlinedSecondary'
|
89 | | 'contained'
|
90 | | 'containedPrimary'
|
91 | | 'containedSecondary'
|
92 | | 'disableElevation'
|
93 | | 'focusVisible'
|
94 | | 'disabled'
|
95 | | 'colorInherit'
|
96 | | 'textSizeSmall'
|
97 | | 'textSizeLarge'
|
98 | | 'outlinedSizeSmall'
|
99 | | 'outlinedSizeLarge'
|
100 | | 'containedSizeSmall'
|
101 | | 'containedSizeLarge'
|
102 | | 'sizeSmall'
|
103 | | 'sizeLarge'
|
104 | | 'fullWidth'
|
105 | | 'startIcon'
|
106 | | 'endIcon'
|
107 | | 'iconSizeSmall'
|
108 | | 'iconSizeMedium'
|
109 | | 'iconSizeLarge';
|
110 |
|
111 | export default Button;
|