-
Notifications
You must be signed in to change notification settings - Fork 8
/
TextField.d.ts
44 lines (42 loc) · 1.46 KB
/
TextField.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import {
Component,
InputHTMLAttributes,
ReactNode,
Ref
} from 'react'
import {
RMWCTagProps,
SimpleBaseProps,
UseProps
} from './Base'
export interface TextFieldHelpTextProps extends SimpleBaseProps<TextFieldHelpText> {
persistent?: boolean,
validationMsg?: boolean
}
export interface TextFieldProps extends RMWCTagProps, InputHTMLAttributes<TextField> {
/** A ref for the native input. */
inputRef?: Ref<any>,
/** Disables the input. */
disabled?: boolean,
/** A label for the input. */
label?: ReactNode,
/** Add a leading icon. */
withLeadingIcon?: ReactNode,
/** Add a trailing icon. */
withTrailingIcon?: ReactNode,
/** By default, props spread to the input. These props are for the component's root container. */
rootProps?: object,
/** Makes a multiline TextField. */
textarea?: boolean,
/** Makes the TextField fullwidth. */
fullwidth?: boolean,
/** Makes the TextField have a visual box. */
box?: boolean
/** Makes the TextField visually invalid. This is sometimes automatically applied in cases where required or pattern is used. */
invalid?: boolean;
/** Outline the TextField */
outlined?: boolean;
}
export class TextFieldIcon extends Component<UseProps<TextFieldIcon>> { }
export class TextFieldHelpText extends Component<TextFieldHelpTextProps> { }
export class TextField extends Component<TextFieldProps> { }