diff options
author | 2022-11-02 06:31:36 +0530 | |
---|---|---|
committer | 2022-11-02 01:01:36 +0000 | |
commit | 302d595f7c289387e53a0ef7df4d574ed4e25d70 (patch) | |
tree | 2385e59eaca9c78921d9b0b3681cfba1b3eef168 /src/@types/mobx-form.types.ts | |
parent | Re-enable editing of the address bar to manually access a different url withi... (diff) | |
download | ferdium-app-302d595f7c289387e53a0ef7df4d574ed4e25d70.tar.gz ferdium-app-302d595f7c289387e53a0ef7df4d574ed4e25d70.tar.zst ferdium-app-302d595f7c289387e53a0ef7df4d574ed4e25d70.zip |
Transform to TS and refactored components w.r.t deletion if duplicated Input component (#729)
Diffstat (limited to 'src/@types/mobx-form.types.ts')
-rw-r--r-- | src/@types/mobx-form.types.ts | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/@types/mobx-form.types.ts b/src/@types/mobx-form.types.ts index c9932c053..2a984d3a6 100644 --- a/src/@types/mobx-form.types.ts +++ b/src/@types/mobx-form.types.ts | |||
@@ -9,29 +9,22 @@ export interface FormFieldOptions { | |||
9 | 9 | ||
10 | export interface FormFields { | 10 | export interface FormFields { |
11 | fields: { | 11 | fields: { |
12 | [key: string]: { | 12 | [key: string]: Field; |
13 | label?: string; | ||
14 | placeholder?: string; | ||
15 | options?: FormFieldOptions[]; | ||
16 | value?: string | boolean | number | null; | ||
17 | default?: string | boolean | number | null; | ||
18 | type?: string; // todo specifiy probably | ||
19 | disabled?: boolean; | ||
20 | validators?: any; // Not sure yet. | ||
21 | }; | ||
22 | }; | 13 | }; |
23 | } | 14 | } |
24 | 15 | ||
25 | export interface Field extends Partial<Listeners> { | 16 | export interface Field extends Listeners { |
26 | id?: string; | 17 | id?: string; |
27 | type?: string; | 18 | type?: string; // todo specifiy probably |
28 | name?: string; | 19 | name?: string; |
29 | value: string | string[]; | 20 | value?: any; |
30 | label?: string; | 21 | label?: string; |
31 | placeholder?: string; | 22 | placeholder?: string; |
32 | disabled?: boolean; | 23 | disabled?: boolean; |
33 | error?: GlobalError | string; | 24 | error?: GlobalError | string; |
34 | options?: SelectOptions[]; | 25 | options?: SelectOptions[]; |
26 | default?: string | boolean | number | null; | ||
27 | validators?: any; // Not sure yet. | ||
35 | } | 28 | } |
36 | 29 | ||
37 | export interface SelectOptions { | 30 | export interface SelectOptions { |