mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
Make Toggle
labels slottable (#1002)
* feat(toggle): support slottable labels * yarn build:lib * docs(toggle): add "Slottable labels" example
This commit is contained in:
parent
37f19d2171
commit
32edfa59dd
5 changed files with 30 additions and 3 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