1 | import * as React from 'react';
|
2 | import { StandardProps } from '..';
|
3 | import { FormLabelProps } from '../FormLabel';
|
4 |
|
5 | export interface InputLabelProps extends StandardProps<FormLabelProps, InputLabelClassKey> {
|
6 | /**
|
7 | * The contents of the `InputLabel`.
|
8 | */
|
9 | children?: React.ReactNode;
|
10 | color?: FormLabelProps['color'];
|
11 | /**
|
12 | * If `true`, the transition animation is disabled.
|
13 | */
|
14 | disableAnimation?: boolean;
|
15 | /**
|
16 | * If `true`, apply disabled class.
|
17 | */
|
18 | disabled?: boolean;
|
19 | /**
|
20 | * If `true`, the label will be displayed in an error state.
|
21 | */
|
22 | error?: boolean;
|
23 | /**
|
24 | * If `true`, the input of this label is focused.
|
25 | */
|
26 | focused?: boolean;
|
27 | /**
|
28 | * If `dense`, will adjust vertical spacing. This is normally obtained via context from
|
29 | * FormControl.
|
30 | */
|
31 | margin?: 'dense';
|
32 | /**
|
33 | * if `true`, the label will indicate that the input is required.
|
34 | */
|
35 | required?: boolean;
|
36 | /**
|
37 | * If `true`, the label is shrunk.
|
38 | */
|
39 | shrink?: boolean;
|
40 | /**
|
41 | * The variant to use.
|
42 | */
|
43 | variant?: 'standard' | 'outlined' | 'filled';
|
44 | }
|
45 |
|
46 | export type InputLabelClassKey =
|
47 | | 'root'
|
48 | | 'focused'
|
49 | | 'disabled'
|
50 | | 'error'
|
51 | | 'required'
|
52 | | 'asterisk'
|
53 | | 'formControl'
|
54 | | 'marginDense'
|
55 | | 'shrink'
|
56 | | 'animated'
|
57 | | 'filled'
|
58 | | 'outlined';
|
59 |
|
60 | /**
|
61 | *
|
62 | * Demos:
|
63 | *
|
64 | * - [Text Fields](https://material-ui.com/components/text-fields/)
|
65 | *
|
66 | * API:
|
67 | *
|
68 | * - [InputLabel API](https://material-ui.com/api/input-label/)
|
69 | * - inherits [FormLabel API](https://material-ui.com/api/form-label/)
|
70 | */
|
71 | export default function InputLabel(props: InputLabelProps): JSX.Element;
|