mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
fix(radio-button): only render span if labelText is truthy
This commit is contained in:
parent
1aa414df66
commit
b357d73155
1 changed files with 3 additions and 1 deletions
|
@ -67,6 +67,8 @@
|
||||||
/>
|
/>
|
||||||
<label class:bx--radio-button__label="{true}" for="{id}">
|
<label class:bx--radio-button__label="{true}" for="{id}">
|
||||||
<span class:bx--radio-button__appearance="{true}"></span>
|
<span class:bx--radio-button__appearance="{true}"></span>
|
||||||
|
{#if labelText}
|
||||||
<span class:bx--visually-hidden="{hideLabel}">{labelText}</span>
|
<span class:bx--visually-hidden="{hideLabel}">{labelText}</span>
|
||||||
|
{/if}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue