mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23:02 +00:00
feat(toggle): support slottable labels
This commit is contained in:
parent
37f19d2171
commit
c416b20e49
1 changed files with 6 additions and 2 deletions
|
@ -81,10 +81,14 @@
|
|||
</slot>
|
||||
<span class:bx--toggle__switch="{true}">
|
||||
<span aria-hidden="true" class:bx--toggle__text--off="{true}">
|
||||
{labelA}
|
||||
<slot name="labelA">
|
||||
{labelA}
|
||||
</slot>
|
||||
</span>
|
||||
<span aria-hidden="true" class:bx--toggle__text--on="{true}">
|
||||
{labelB}
|
||||
<slot name="labelB">
|
||||
{labelB}
|
||||
</slot>
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue