feat: support all HTML input types
This commit is contained in:
parent
e91c060c9e
commit
5caf3d9cde
1 changed files with 24 additions and 1 deletions
|
@ -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';
|
||||||
|
|
Loading…
Reference in a new issue