From 8ec9a7137f5caee22b9647f615daa9639f60181a Mon Sep 17 00:00:00 2001 From: josefaidt Date: Thu, 17 Sep 2020 15:05:19 -0500 Subject: [PATCH] chore(select): move helper text below input --- src/Select/Select.stories.js | 1 + src/Select/Select.svelte | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Select/Select.stories.js b/src/Select/Select.stories.js index 1a81fecc..1ee174ee 100644 --- a/src/Select/Select.stories.js +++ b/src/Select/Select.stories.js @@ -27,6 +27,7 @@ export const Default = () => ({ "A valid value is required" ), labelText: text("Label text (helperText)", "Select"), + helperText: text("Helper text (helperText)", "Optional helper text here"), id: text("Select id", "select-id"), name: text("Select name", "select-name"), }, diff --git a/src/Select/Select.svelte b/src/Select/Select.svelte index d560684b..26c3d404 100644 --- a/src/Select/Select.svelte +++ b/src/Select/Select.svelte @@ -118,13 +118,6 @@ {labelText} {/if} - {#if !inline && helperText} -
- {helperText} -
- {/if} {#if inline}
{/if}
+ {#if !invalid && helperText} +
+ {helperText} +
+ {/if} {#if invalid}
{invalidText}