From 2fcf7d86030cf1103ad869e3a51a1f961342bd1c Mon Sep 17 00:00:00 2001 From: Gustav Hansen Date: Thu, 10 Mar 2022 17:15:08 +0100 Subject: [PATCH] Docs: Update GenericInput storybook documentation --- .../GenericInput/GenericInput.stories.mdx | 3 ++ .../GenericInput/storyUtils/layout.js | 35 ++++++++++++++++--- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/packages/core/helper-plugin/lib/src/components/GenericInput/GenericInput.stories.mdx b/packages/core/helper-plugin/lib/src/components/GenericInput/GenericInput.stories.mdx index 860e4d455e..20e1dc69b6 100644 --- a/packages/core/helper-plugin/lib/src/components/GenericInput/GenericInput.stories.mdx +++ b/packages/core/helper-plugin/lib/src/components/GenericInput/GenericInput.stories.mdx @@ -28,6 +28,9 @@ Description... firstname: 'ee', email: '', private: null, + isNullable: null, + isActiveByDefault: true, + isInactiveByDefault: false }); return ( diff --git a/packages/core/helper-plugin/lib/src/components/GenericInput/storyUtils/layout.js b/packages/core/helper-plugin/lib/src/components/GenericInput/storyUtils/layout.js index b48b382fad..21fbffb577 100644 --- a/packages/core/helper-plugin/lib/src/components/GenericInput/storyUtils/layout.js +++ b/packages/core/helper-plugin/lib/src/components/GenericInput/storyUtils/layout.js @@ -69,15 +69,43 @@ const layout = [ { intlLabel: { id: 'Auth.form.active.label', - defaultMessage: 'Active', + defaultMessage: 'Boolean: Nullable', }, - name: 'isActive', + isNullable: true, + name: 'isNullable', type: 'bool', size: { - col: 6, + col: 2, xs: 12, }, }, + + { + intlLabel: { + id: 'Auth.form.active.label', + defaultMessage: 'Boolean: Active by default', + }, + name: 'isActiveByDefault', + type: 'bool', + size: { + col: 2, + xs: 12, + }, + }, + + { + intlLabel: { + id: 'Auth.form.inactive.label', + defaultMessage: 'Boolean: Inactive by default', + }, + name: 'isInactiveByDefault', + type: 'bool', + size: { + col: 2, + xs: 12, + }, + }, + { name: 'private', type: 'checkbox', @@ -93,7 +121,6 @@ const layout = [ id: 'form.attribute.item.privateField.description', defaultMessage: 'This field will not show up in the API response', }, - // validations: {}, }, { intlLabel: { id: 'meal', defaultMessage: 'meal' },