1 | import * as React from 'react';
|
2 | import { SxProps } from '@mui/system';
|
3 | import { OverridableStringUnion } from '@mui/types';
|
4 | import { FormLabelProps, ExtendFormLabelTypeMap } from '../FormLabel';
|
5 | import { Theme } from '../styles';
|
6 | import { InputLabelClasses } from './inputLabelClasses';
|
7 | import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
8 |
|
9 | export interface InputLabelPropsSizeOverrides {}
|
10 |
|
11 | export interface InputLabelOwnProps extends Pick<FormLabelProps, 'children'> {
|
12 | |
13 |
|
14 |
|
15 | classes?: Partial<InputLabelClasses>;
|
16 | color?: FormLabelProps['color'];
|
17 | |
18 |
|
19 |
|
20 |
|
21 | disableAnimation?: boolean;
|
22 | |
23 |
|
24 |
|
25 | disabled?: boolean;
|
26 | |
27 |
|
28 |
|
29 | error?: boolean;
|
30 | |
31 |
|
32 |
|
33 | focused?: boolean;
|
34 | |
35 |
|
36 |
|
37 |
|
38 | margin?: 'dense';
|
39 | |
40 |
|
41 |
|
42 | required?: boolean;
|
43 | |
44 |
|
45 |
|
46 | shrink?: boolean;
|
47 | |
48 |
|
49 |
|
50 |
|
51 | size?: OverridableStringUnion<'small' | 'normal', InputLabelPropsSizeOverrides>;
|
52 | |
53 |
|
54 |
|
55 | sx?: SxProps<Theme>;
|
56 | |
57 |
|
58 |
|
59 | variant?: 'standard' | 'outlined' | 'filled';
|
60 | }
|
61 |
|
62 | export type InputLabelTypeMap<
|
63 | AdditionalProps = {},
|
64 | RootComponent extends React.ElementType = 'label',
|
65 | > = ExtendFormLabelTypeMap<{
|
66 | props: AdditionalProps & InputLabelOwnProps;
|
67 | defaultComponent: RootComponent;
|
68 | }>;
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 | declare const InputLabel: OverridableComponent<InputLabelTypeMap>;
|
82 |
|
83 | export type InputLabelProps<
|
84 | RootComponent extends React.ElementType = InputLabelTypeMap['defaultComponent'],
|
85 | AdditionalProps = {},
|
86 | > = OverrideProps<InputLabelTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
87 | component?: React.ElementType;
|
88 | };
|
89 |
|
90 | export default InputLabel;
|