DefinitelyTyped/reactstrap/lib/Input.d.ts
Marco Falkenberg 8934f1102f Add typings for reactstrap (#15357)
* Add typings for reactstrap

* Make lint happy

* Do not „double-reference“ to React types
2017-03-24 08:36:17 -07:00

46 lines
956 B
TypeScript

type InputType =
| 'text'
| 'email'
| 'select'
| 'file'
| 'radio'
| 'checkbox'
| 'textarea'
| 'button'
| 'reset'
| 'submit'
| 'date'
| 'datetime-local'
| 'hidden'
| 'image'
| 'month'
| 'number'
| 'range'
| 'search'
| 'tel'
| 'url'
| 'week'
| 'password'
| 'datetime'
| 'time'
| 'color';
// Intermediate interface to "redefine" the type of size to string
// size:number => size:any => size:string
interface Intermediate extends React.ChangeTargetHTMLProps<HTMLInputElement> {
size?: any;
}
interface InputProps extends Intermediate {
type?: InputType;
size?: string;
state?: string;
tag?: React.ReactType;
addon?: boolean;
className?: string;
// We don't have the property 'static' here because 'static' is a reserved keyword in TypeScript
// Maybe reactstrap will support an 'isStatic' alias in the future
}
declare var Input: React.StatelessComponent<InputProps>;
export default Input;