UNPKG

859 BTypeScriptView Raw
1import * as React from 'react';
2import { CSSModule } from './utils';
3
4export type InputType =
5 | 'text'
6 | 'email'
7 | 'select'
8 | 'file'
9 | 'radio'
10 | 'checkbox'
11 | 'switch'
12 | 'textarea'
13 | 'button'
14 | 'reset'
15 | 'submit'
16 | 'date'
17 | 'datetime-local'
18 | 'hidden'
19 | 'image'
20 | 'month'
21 | 'number'
22 | 'range'
23 | 'search'
24 | 'tel'
25 | 'url'
26 | 'week'
27 | 'password'
28 | 'datetime'
29 | 'time'
30 | 'color';
31
32export interface InputProps
33 extends React.InputHTMLAttributes<HTMLInputElement> {
34 [key: string]: any;
35 type?: InputType;
36 bsSize?: 'lg' | 'sm';
37 valid?: boolean;
38 invalid?: boolean;
39 tag?: React.ElementType;
40 innerRef?: React.Ref<HTMLInputElement | HTMLTextAreaElement>;
41 plaintext?: boolean;
42 addon?: boolean;
43 cssModule?: CSSModule;
44}
45
46declare class Input extends React.Component<InputProps> {}
47export default Input;