mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 11:59:34 +00:00
feat(toggle): dispatch toggle event
This commit is contained in:
parent
fed83f8bf4
commit
c0dd80d149
6 changed files with 38 additions and 11 deletions
|
@ -19,6 +19,10 @@ components: ["Toggle", "ToggleSkeleton"]
|
|||
|
||||
<FileSource src="/framed/Toggle/ToggleReactive" />
|
||||
|
||||
### on:toggle event
|
||||
|
||||
<Toggle labelText="Push notifications" on:toggle={e => console.log(e.detail)} />
|
||||
|
||||
### Custom labels
|
||||
|
||||
<Toggle labelText="Push notifications" labelA="No" labelB="Yes" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue