mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
Contributes to [TextInput] helperText enhancements #1633
This commit is contained in:
parent
ae686c2728
commit
00338eb6df
1 changed files with 8 additions and 4 deletions
|
@ -168,13 +168,15 @@
|
|||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{#if !isFluid && helperText}
|
||||
{#if !isFluid && (helperText || $$slots.helperText)}
|
||||
<div
|
||||
class:bx--form__helper-text="{true}"
|
||||
class:bx--form__helper-text--disabled="{disabled}"
|
||||
class:bx--form__helper-text--inline="{inline}"
|
||||
>
|
||||
{helperText}
|
||||
<slot name="helperText">
|
||||
{helperText}
|
||||
</slot>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
@ -285,14 +287,16 @@
|
|||
<div class:bx--form-requirement="{true}" id="{warnId}">{warnText}</div>
|
||||
{/if}
|
||||
</div>
|
||||
{#if !invalid && !warn && !isFluid && !inline && helperText}
|
||||
{#if !invalid && !warn && !isFluid && !inline && (helperText || $$slots.helperText)}
|
||||
<div
|
||||
id="{helperId}"
|
||||
class:bx--form__helper-text="{true}"
|
||||
class:bx--form__helper-text--disabled="{disabled}"
|
||||
class:bx--form__helper-text--inline="{inline}"
|
||||
>
|
||||
{helperText}
|
||||
<slot name="helperText">
|
||||
{helperText}
|
||||
</slot>
|
||||
</div>
|
||||
{/if}
|
||||
{#if !isFluid && invalid}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue