mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
chore(numberinput): move helper text below input
This commit is contained in:
parent
b61be53f09
commit
544d48d2e8
2 changed files with 8 additions and 14 deletions
|
@ -30,6 +30,7 @@ export const Default = () => ({
|
|||
disabled: boolean("Disabled (disabled)", false),
|
||||
readonly: boolean("Read only (readonly)", false),
|
||||
invalid: boolean("Show form validation UI (invalid)", false),
|
||||
helperText: text("Helper text (helperText)", "Optional helper text here"),
|
||||
mobile: boolean("Mobile variant (mobile)", false),
|
||||
invalidText: text(
|
||||
"Form validation UI content (invalidText)",
|
||||
|
|
|
@ -198,13 +198,6 @@
|
|||
<slot name="label">{label}</slot>
|
||||
</label>
|
||||
{/if}
|
||||
{#if helperText}
|
||||
<div
|
||||
class:bx--form__helper-text="{true}"
|
||||
class:bx--form__helper-text--disabled="{disabled}">
|
||||
{helperText}
|
||||
</div>
|
||||
{/if}
|
||||
<div class:bx--number__input-wrapper="{true}">
|
||||
<button
|
||||
type="button"
|
||||
|
@ -262,13 +255,6 @@
|
|||
<slot name="label">{label}</slot>
|
||||
</label>
|
||||
{/if}
|
||||
{#if helperText}
|
||||
<div
|
||||
class:bx--form__helper-text="{true}"
|
||||
class:bx--form__helper-text--disabled="{disabled}">
|
||||
{helperText}
|
||||
</div>
|
||||
{/if}
|
||||
<div class:bx--number__input-wrapper="{true}">
|
||||
<input
|
||||
bind:this="{ref}"
|
||||
|
@ -324,6 +310,13 @@
|
|||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if !error && helperText}
|
||||
<div
|
||||
class:bx--form__helper-text="{true}"
|
||||
class:bx--form__helper-text--disabled="{disabled}">
|
||||
{helperText}
|
||||
</div>
|
||||
{/if}
|
||||
{#if error}
|
||||
<div id="{errorId}" class:bx--form-requirement="{true}">
|
||||
{invalidText}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue