Skip to content

Commit

Permalink
docs: add toggle custom color example
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed Dec 8, 2023
1 parent 7ae8f6f commit 441662c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/docs/src/routes/(docs)/components/toggle/+page.svelte.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,10 @@ data="{[
<input type="checkbox" class="$$toggle" id="my-toggle" />`
}</pre>
</Component>

<Component title="Toggle with custom color">
<input type="checkbox" class="toggle [--tglbg:yellow] bg-blue-500 hover:bg-blue-700 border-blue-500" checked />
<pre slot="html" use:replace={{ to: $prefix }}>{
`<input type="checkbox" class="$$toggle [--tglbg:yellow] bg-blue-500 hover:bg-blue-700 border-blue-500" checked />`
}</pre>
</Component>

0 comments on commit 441662c

Please sign in to comment.