From e17db2e0d615bc4e60af9fa73db9d96a52281720 Mon Sep 17 00:00:00 2001 From: Dharini Jeeva Date: Mon, 19 Sep 2022 13:07:31 -0700 Subject: [PATCH] Update fieldset (#1334) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 🤖 add helpertext to fieldset and update text --- .../components/rose/form/fieldset/index.hbs | 10 +++++++ .../rose/form/fieldset/index.stories.mdx | 27 +++++++++++-------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/addons/rose/addon/components/rose/form/fieldset/index.hbs b/addons/rose/addon/components/rose/form/fieldset/index.hbs index 6d0eae5ab..36b6a0446 100644 --- a/addons/rose/addon/components/rose/form/fieldset/index.hbs +++ b/addons/rose/addon/components/rose/form/fieldset/index.hbs @@ -19,6 +19,16 @@ {{/if}} + {{#if @helperText}} + + {{@helperText}} + + {{/if}}
{{yield to='body'}}
diff --git a/addons/rose/addon/components/rose/form/fieldset/index.stories.mdx b/addons/rose/addon/components/rose/form/fieldset/index.stories.mdx index 9dd61a4c6..9a52718c0 100644 --- a/addons/rose/addon/components/rose/form/fieldset/index.stories.mdx +++ b/addons/rose/addon/components/rose/form/fieldset/index.stories.mdx @@ -7,10 +7,10 @@ import { text, boolean, select } from '@storybook/addon-knobs'; # Form Fieldset -Renders a simple fieldset with title, description and body. +Renders a simple fieldset with title, description and body and an optional helperText ```html - + <:title>Title <:description>Description <:body>Rest of the form @@ -18,12 +18,17 @@ Renders a simple fieldset with title, description and body. ``` - {{ - template: hbs` - - <:title>Title - <:description>Description - <:body>Rest of the form - ` - }} - \ No newline at end of file + + {{ + template: hbs` + + <:title>Title + <:description>Description + <:body>Rest of the form + `, + context: { + helperText: text('helperText', 'This is an optional help text.'), + }, + }} + +