mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
fix(slider): no label is rendered when the labelText property is not specified.
This commit is contained in:
parent
ad711cdb38
commit
e58ed7ae64
1 changed files with 12 additions and 10 deletions
|
@ -140,16 +140,18 @@
|
|||
on:mouseenter
|
||||
on:mouseleave
|
||||
>
|
||||
<label
|
||||
for="{id}"
|
||||
id="{labelId}"
|
||||
class:bx--label="{true}"
|
||||
class:bx--label--disabled="{disabled}"
|
||||
>
|
||||
<slot name="labelText">
|
||||
{labelText}
|
||||
</slot>
|
||||
</label>
|
||||
{#if labelText || $$slots.labelText}
|
||||
<label
|
||||
for="{id}"
|
||||
id="{labelId}"
|
||||
class:bx--label="{true}"
|
||||
class:bx--label--disabled="{disabled}"
|
||||
>
|
||||
<slot name="labelText">
|
||||
{labelText}
|
||||
</slot>
|
||||
</label>
|
||||
{/if}
|
||||
<div
|
||||
class:bx--slider-container="{true}"
|
||||
style="{fullWidth ? 'width: 100%' : undefined}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue