diff options
author | 2022-10-31 05:20:17 +0530 | |
---|---|---|
committer | 2022-10-30 23:50:17 +0000 | |
commit | 011e73f24f8ae15091d41781c93c313d0167d887 (patch) | |
tree | 3e012f97a9c3ecf98e348690f82dae0d58ec0155 /src/@types/mobx-form.types.ts | |
parent | 6.2.1-nightly.33 [skip ci] (diff) | |
download | ferdium-app-011e73f24f8ae15091d41781c93c313d0167d887.tar.gz ferdium-app-011e73f24f8ae15091d41781c93c313d0167d887.tar.zst ferdium-app-011e73f24f8ae15091d41781c93c313d0167d887.zip |
Convert LoginScreen component tree to typescript (#721)
Diffstat (limited to 'src/@types/mobx-form.types.ts')
-rw-r--r-- | src/@types/mobx-form.types.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/@types/mobx-form.types.ts b/src/@types/mobx-form.types.ts index 6bc20f5e1..7caddc9e4 100644 --- a/src/@types/mobx-form.types.ts +++ b/src/@types/mobx-form.types.ts | |||
@@ -1,3 +1,6 @@ | |||
1 | import { ChangeEventHandler, FocusEventHandler } from 'react'; | ||
2 | import { GlobalError } from './ferdium-components.types'; | ||
3 | |||
1 | export interface FormFieldOptions { | 4 | export interface FormFieldOptions { |
2 | value?: string; | 5 | value?: string; |
3 | label?: string; | 6 | label?: string; |
@@ -18,3 +21,20 @@ export interface FormFields { | |||
18 | }; | 21 | }; |
19 | }; | 22 | }; |
20 | } | 23 | } |
24 | |||
25 | export interface Field extends Partial<Listeners> { | ||
26 | id?: string; | ||
27 | type?: string; | ||
28 | name?: string; | ||
29 | value: string; | ||
30 | label?: string; | ||
31 | placeholder?: string; | ||
32 | disabled?: boolean; | ||
33 | error?: GlobalError | string; | ||
34 | } | ||
35 | |||
36 | export interface Listeners { | ||
37 | onChange?: ChangeEventHandler<HTMLInputElement>; | ||
38 | onBlur?: FocusEventHandler<HTMLElement>; | ||
39 | onFocus?: FocusEventHandler<HTMLElement>; | ||
40 | } | ||