aboutsummaryrefslogtreecommitdiff
path: root/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.stories.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-10-27 15:13:35 -0300
committerSebastian <sebasjm@gmail.com>2021-10-27 15:13:35 -0300
commit32318a80f48bf52ca7823a0c055164f43bdaf1d6 (patch)
tree08ef42e65d1db93f3958dd75d39f4bff1d03d2b6 /packages/anastasis-webui/src/pages/home/AttributeEntryScreen.stories.tsx
parent21b60c8f6ff69bf114779a767a3ac3355f69a34f (diff)
downloadwallet-core-32318a80f48bf52ca7823a0c055164f43bdaf1d6.tar.xz
working version with improved ui
Diffstat (limited to 'packages/anastasis-webui/src/pages/home/AttributeEntryScreen.stories.tsx')
-rw-r--r--packages/anastasis-webui/src/pages/home/AttributeEntryScreen.stories.tsx28
1 files changed, 18 insertions, 10 deletions
diff --git a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.stories.tsx b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.stories.tsx
index d9be48fb4..32d7817e3 100644
--- a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.stories.tsx
+++ b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.stories.tsx
@@ -40,21 +40,21 @@ export default {
export const Backup = createExample(TestedComponent, {
...reducerStatesExample.backupAttributeEditing,
required_attributes: [{
- name: 'first',
+ name: 'first name',
label: 'first',
- type: 'type',
+ type: 'string',
uuid: 'asdasdsa1',
widget: 'wid',
}, {
- name: 'pepe',
+ name: 'last name',
label: 'second',
- type: 'type',
+ type: 'string',
uuid: 'asdasdsa2',
widget: 'wid',
}, {
- name: 'pepe2',
+ name: 'date',
label: 'third',
- type: 'type',
+ type: 'date',
uuid: 'asdasdsa3',
widget: 'calendar',
}]
@@ -65,19 +65,19 @@ export const Recovery = createExample(TestedComponent, {
required_attributes: [{
name: 'first',
label: 'first',
- type: 'type',
+ type: 'string',
uuid: 'asdasdsa1',
widget: 'wid',
}, {
name: 'pepe',
label: 'second',
- type: 'type',
+ type: 'string',
uuid: 'asdasdsa2',
widget: 'wid',
}, {
name: 'pepe2',
label: 'third',
- type: 'type',
+ type: 'date',
uuid: 'asdasdsa3',
widget: 'calendar',
}]
@@ -110,12 +110,20 @@ const allWidgets = [
"anastasis_gtk_xx_square",
]
+function typeForWidget(name: string): string {
+ if (["anastasis_gtk_xx_prime",
+ "anastasis_gtk_xx_square",
+ ].includes(name)) return "number";
+ if (["anastasis_gtk_ia_birthdate"].includes(name)) return "date"
+ return "string";
+}
+
export const WithAllPosibleWidget = createExample(TestedComponent, {
...reducerStatesExample.backupAttributeEditing,
required_attributes: allWidgets.map(w => ({
name: w,
label: `widget: ${w}`,
- type: 'type',
+ type: typeForWidget(w),
uuid: `uuid-${w}`,
widget: w
}))