diff options
author | muhamedsalih-tw <104364298+muhamedsalih-tw@users.noreply.github.com> | 2022-11-01 06:42:12 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-01 01:12:12 +0000 |
commit | 85d1aac4cd70e79d5ab64684dea09e92b17ed2c2 (patch) | |
tree | a006a2eb5c58b9351219d8a85d57a04c5c73787a /src/@types/mobx-form.types.ts | |
parent | refactor: convert global app to typescript (#723) (diff) | |
download | ferdium-app-85d1aac4cd70e79d5ab64684dea09e92b17ed2c2.tar.gz ferdium-app-85d1aac4cd70e79d5ab64684dea09e92b17ed2c2.tar.zst ferdium-app-85d1aac4cd70e79d5ab64684dea09e92b17ed2c2.zip |
Transform ChangeServer components tree to typescript (#725)
Diffstat (limited to 'src/@types/mobx-form.types.ts')
-rw-r--r-- | src/@types/mobx-form.types.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/@types/mobx-form.types.ts b/src/@types/mobx-form.types.ts index 7caddc9e4..c9932c053 100644 --- a/src/@types/mobx-form.types.ts +++ b/src/@types/mobx-form.types.ts | |||
@@ -26,15 +26,22 @@ export interface Field extends Partial<Listeners> { | |||
26 | id?: string; | 26 | id?: string; |
27 | type?: string; | 27 | type?: string; |
28 | name?: string; | 28 | name?: string; |
29 | value: string; | 29 | value: string | string[]; |
30 | label?: string; | 30 | label?: string; |
31 | placeholder?: string; | 31 | placeholder?: string; |
32 | disabled?: boolean; | 32 | disabled?: boolean; |
33 | error?: GlobalError | string; | 33 | error?: GlobalError | string; |
34 | options?: SelectOptions[]; | ||
35 | } | ||
36 | |||
37 | export interface SelectOptions { | ||
38 | disabled?: boolean; | ||
39 | label?: string; | ||
40 | value?: string; | ||
34 | } | 41 | } |
35 | 42 | ||
36 | export interface Listeners { | 43 | export interface Listeners { |
37 | onChange?: ChangeEventHandler<HTMLInputElement>; | 44 | onChange?: ChangeEventHandler<HTMLInputElement | HTMLSelectElement>; |
38 | onBlur?: FocusEventHandler<HTMLElement>; | 45 | onBlur?: FocusEventHandler<HTMLElement>; |
39 | onFocus?: FocusEventHandler<HTMLElement>; | 46 | onFocus?: FocusEventHandler<HTMLElement>; |
40 | } | 47 | } |