chore(dropdown): move helper text below input

This commit is contained in:
josefaidt 2020-09-17 14:57:03 -05:00
commit 95e3a6eb12
2 changed files with 8 additions and 7 deletions

View file

@ -26,6 +26,7 @@ export const Default = () => ({
disabled: boolean("Disabled (disabled)", false), disabled: boolean("Disabled (disabled)", false),
light: boolean("Light variant (light)", false), light: boolean("Light variant (light)", false),
titleText: text("Title (titleText)", "This is not a dropdown title."), titleText: text("Title (titleText)", "This is not a dropdown title."),
helperText: text("Helper text (helperText)", "Optional helper text here"),
invalid: boolean("Show form validation UI (invalid)", false), invalid: boolean("Show form validation UI (invalid)", false),
invalidText: text( invalidText: text(
"Form validation UI content (invalidText)", "Form validation UI content (invalidText)",

View file

@ -166,13 +166,6 @@
{titleText} {titleText}
</label> </label>
{/if} {/if}
{#if !inline && helperText}
<div
class:bx--form__helper-text="{true}"
class:bx--form__helper-text--disabled="{disabled}">
{helperText}
</div>
{/if}
<ListBox <ListBox
type="{type}" type="{type}"
size="{size}" size="{size}"
@ -250,4 +243,11 @@
</ListBoxMenu> </ListBoxMenu>
{/if} {/if}
</ListBox> </ListBox>
{#if !inline && !invalid && helperText}
<div
class:bx--form__helper-text="{true}"
class:bx--form__helper-text--disabled="{disabled}">
{helperText}
</div>
{/if}
</div> </div>