mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
chore(select): move helper text below input
This commit is contained in:
parent
544d48d2e8
commit
8ec9a7137f
2 changed files with 8 additions and 7 deletions
|
@ -27,6 +27,7 @@ export const Default = () => ({
|
||||||
"A valid value is required"
|
"A valid value is required"
|
||||||
),
|
),
|
||||||
labelText: text("Label text (helperText)", "Select"),
|
labelText: text("Label text (helperText)", "Select"),
|
||||||
|
helperText: text("Helper text (helperText)", "Optional helper text here"),
|
||||||
id: text("Select id", "select-id"),
|
id: text("Select id", "select-id"),
|
||||||
name: text("Select name", "select-name"),
|
name: text("Select name", "select-name"),
|
||||||
},
|
},
|
||||||
|
|
|
@ -118,13 +118,6 @@
|
||||||
{labelText}
|
{labelText}
|
||||||
</label>
|
</label>
|
||||||
{/if}
|
{/if}
|
||||||
{#if !inline && helperText}
|
|
||||||
<div
|
|
||||||
class:bx--form__helper-text="{true}"
|
|
||||||
class:bx--form__helper-text--disabled="{disabled}">
|
|
||||||
{helperText}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
{#if inline}
|
{#if inline}
|
||||||
<div class:bx--select-input--inline__wrapper="{true}">
|
<div class:bx--select-input--inline__wrapper="{true}">
|
||||||
<div
|
<div
|
||||||
|
@ -188,6 +181,13 @@
|
||||||
<WarningFilled16 class="bx--select__invalid-icon" />
|
<WarningFilled16 class="bx--select__invalid-icon" />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
{#if !invalid && helperText}
|
||||||
|
<div
|
||||||
|
class:bx--form__helper-text="{true}"
|
||||||
|
class:bx--form__helper-text--disabled="{disabled}">
|
||||||
|
{helperText}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
{#if invalid}
|
{#if invalid}
|
||||||
<div id="{errorId}" class:bx--form-requirement="{true}">
|
<div id="{errorId}" class:bx--form-requirement="{true}">
|
||||||
{invalidText}
|
{invalidText}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue