mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(number-input): disable label, helper text
This commit is contained in:
parent
6a955b1c60
commit
37c7f07448
1 changed files with 12 additions and 2 deletions
|
@ -193,12 +193,17 @@
|
||||||
<label
|
<label
|
||||||
for="{id}"
|
for="{id}"
|
||||||
class:bx--label="{true}"
|
class:bx--label="{true}"
|
||||||
|
class:bx--label--disabled="{disabled}"
|
||||||
class:bx--visually-hidden="{hideLabel}">
|
class:bx--visually-hidden="{hideLabel}">
|
||||||
<slot name="label">{label}</slot>
|
<slot name="label">{label}</slot>
|
||||||
</label>
|
</label>
|
||||||
{/if}
|
{/if}
|
||||||
{#if helperText}
|
{#if helperText}
|
||||||
<div class:bx--form__helper-text="{true}">{helperText}</div>
|
<div
|
||||||
|
class:bx--form__helper-text="{true}"
|
||||||
|
class:bx--form__helper-text--disabled="{disabled}">
|
||||||
|
{helperText}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class:bx--number__input-wrapper="{true}">
|
<div class:bx--number__input-wrapper="{true}">
|
||||||
<button
|
<button
|
||||||
|
@ -252,12 +257,17 @@
|
||||||
<label
|
<label
|
||||||
for="{id}"
|
for="{id}"
|
||||||
class:bx--label="{true}"
|
class:bx--label="{true}"
|
||||||
|
class:bx--label--disabled="{disabled}"
|
||||||
class:bx--visually-hidden="{hideLabel}">
|
class:bx--visually-hidden="{hideLabel}">
|
||||||
<slot name="label">{label}</slot>
|
<slot name="label">{label}</slot>
|
||||||
</label>
|
</label>
|
||||||
{/if}
|
{/if}
|
||||||
{#if helperText}
|
{#if helperText}
|
||||||
<div class:bx--form__helper-text="{true}">{helperText}</div>
|
<div
|
||||||
|
class:bx--form__helper-text="{true}"
|
||||||
|
class:bx--form__helper-text--disabled="{disabled}">
|
||||||
|
{helperText}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class:bx--number__input-wrapper="{true}">
|
<div class:bx--number__input-wrapper="{true}">
|
||||||
<input
|
<input
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue