1 | import * as React from 'react';
|
2 | import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
3 |
|
4 | export interface FormHelperTextTypeMap<P = {}, D extends React.ElementType = 'p'> {
|
5 | props: P & {
|
6 | /**
|
7 | * The content of the component.
|
8 | *
|
9 | * If `' '` is provided, the component reserves one line height for displaying a future message.
|
10 | */
|
11 | children?: React.ReactNode;
|
12 | /**
|
13 | * If `true`, the helper text should be displayed in a disabled state.
|
14 | */
|
15 | disabled?: boolean;
|
16 | /**
|
17 | * If `true`, helper text should be displayed in an error state.
|
18 | */
|
19 | error?: boolean;
|
20 | /**
|
21 | * If `true`, the helper text should use filled classes key.
|
22 | */
|
23 | filled?: boolean;
|
24 | /**
|
25 | * If `true`, the helper text should use focused classes key.
|
26 | */
|
27 | focused?: boolean;
|
28 | /**
|
29 | * If `dense`, will adjust vertical spacing. This is normally obtained via context from
|
30 | * FormControl.
|
31 | */
|
32 | margin?: 'dense';
|
33 | /**
|
34 | * If `true`, the helper text should use required classes key.
|
35 | */
|
36 | required?: boolean;
|
37 | /**
|
38 | * The variant to use.
|
39 | */
|
40 | variant?: 'standard' | 'outlined' | 'filled';
|
41 | };
|
42 | defaultComponent: D;
|
43 | classKey: FormHelperTextClassKey;
|
44 | }
|
45 | /**
|
46 | *
|
47 | * Demos:
|
48 | *
|
49 | * - [Text Fields](https://material-ui.com/components/text-fields/)
|
50 | *
|
51 | * API:
|
52 | *
|
53 | * - [FormHelperText API](https://material-ui.com/api/form-helper-text/)
|
54 | */
|
55 | declare const FormHelperText: OverridableComponent<FormHelperTextTypeMap>;
|
56 |
|
57 | export type FormHelperTextClassKey =
|
58 | | 'root'
|
59 | | 'error'
|
60 | | 'disabled'
|
61 | | 'marginDense'
|
62 | | 'focused'
|
63 | | 'filled'
|
64 | | 'contained'
|
65 | | 'required';
|
66 |
|
67 | export type FormHelperTextProps<
|
68 | D extends React.ElementType = FormHelperTextTypeMap['defaultComponent'],
|
69 | P = {}
|
70 | > = OverrideProps<FormHelperTextTypeMap<P, D>, D>;
|
71 |
|
72 | export default FormHelperText;
|