UNPKG

1.28 kBTypeScriptView Raw
1import * as React from 'react';
2import { StandardProps } from '..';
3import { InputBaseProps } from '../InputBase';
4
5export interface OutlinedInputProps extends StandardProps<InputBaseProps, OutlinedInputClassKey> {
6 /**
7 * The label of the input. It is only used for layout. The actual labelling
8 * is handled by `InputLabel`. If specified `labelWidth` is ignored.
9 */
10 label?: React.ReactNode;
11 /**
12 * The width of the label. Is ignored if `label` is provided. Prefer `label`
13 * if the input label appears with a strike through.
14 */
15 labelWidth?: number;
16 /**
17 * If `true`, the outline is notched to accommodate the label.
18 */
19 notched?: boolean;
20}
21
22export type OutlinedInputClassKey =
23 | 'root'
24 | 'colorSecondary'
25 | 'focused'
26 | 'disabled'
27 | 'adornedStart'
28 | 'adornedEnd'
29 | 'error'
30 | 'marginDense'
31 | 'multiline'
32 | 'notchedOutline'
33 | 'input'
34 | 'inputMarginDense'
35 | 'inputMultiline'
36 | 'inputAdornedStart'
37 | 'inputAdornedEnd';
38
39/**
40 *
41 * Demos:
42 *
43 * - [Text Fields](https://mui.com/components/text-fields/)
44 *
45 * API:
46 *
47 * - [OutlinedInput API](https://mui.com/api/outlined-input/)
48 * - inherits [InputBase API](https://mui.com/api/input-base/)
49 */
50export default function OutlinedInput(props: OutlinedInputProps): JSX.Element;