feat: support all HTML input types

This commit is contained in:
Ayo 2022-10-01 13:28:18 +02:00
parent e91c060c9e
commit 5caf3d9cde

View file

@ -1,6 +1,29 @@
type FormControlType =
| 'text'
| 'checkbox'
| 'radio'
| 'password'
| 'button'
| 'color'
| 'date'
| 'datetime-local'
| 'email'
| 'file'
| 'hidden'
| 'image'
| 'month'
| 'number'
| 'range'
| 'search'
| 'submit'
| 'tel'
| 'time'
| 'url'
| 'week';
export class FormControl { export class FormControl {
name: string; name: string;
type?: 'text' | 'checkbox' | 'radio' | 'password' = 'text'; // add more type?: FormControlType = 'text';
value?: string | number | null | string[]; value?: string | number | null | string[];
label?: string; label?: string;
labelPosition?: 'right' | 'left' = 'left'; labelPosition?: 'right' | 'left' = 'left';