Skip to content

Commit

Permalink
Make some changes to on:change
Browse files Browse the repository at this point in the history
  • Loading branch information
rgossiaux committed Jun 11, 2023
1 parent 2379d2d commit 4e944fc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/routes/radio-group/radio-group.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<div class="p-12 max-w-xl">
<a href="/">Link before</a>
<RadioGroup value={active} on:change={(event) => (active = event.detail)}>
<RadioGroup bind:value={active}>
<fieldset class="space-y-4">
<legend>
<h2 class="text-xl">Privacy setting</h2>
Expand Down
3 changes: 1 addition & 2 deletions src/routes/switch/switch-with-pure-tailwind.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

<Switch
as="button"
checked={state}
on:change={(event) => (state = event.detail)}
bind:checked={state}
class={({ checked }) =>
classNames(
"relative inline-flex flex-shrink-0 h-6 border-2 border-transparent rounded-full cursor-pointer w-11 focus:outline-none focus:shadow-outline transition-colors ease-in-out duration-200",
Expand Down
3 changes: 1 addition & 2 deletions src/routes/tabs/tabs-with-pure-tailwind.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@

<Switch
as="button"
checked={manual}
on:change={(event) => (manual = event.detail)}
bind:checked={manual}
class={({ checked }) =>
classNames(
"relative inline-flex flex-shrink-0 h-6 border-2 border-transparent rounded-full cursor-pointer w-11 focus:outline-none focus:shadow-outline transition-colors ease-in-out duration-200",
Expand Down

0 comments on commit 4e944fc

Please sign in to comment.