feat(toggle): dispatch toggle event

This commit is contained in:
Eric Liu 2021-02-03 06:04:07 -08:00
commit c0dd80d149
6 changed files with 38 additions and 11 deletions

View file

@ -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" />