This commit is contained in:
Timothy Jaeryang Baek
2024-11-16 17:49:13 -08:00
parent af0ba53715
commit a1ce8422fd
9 changed files with 67 additions and 69 deletions
+2 -4
View File
@@ -4,14 +4,12 @@
export let state = true;
const dispatch = createEventDispatcher();
$: dispatch('change', state);
</script>
<Switch.Root
bind:checked={state}
onCheckedChange={async (e) => {
await tick();
dispatch('change', e);
}}
class="flex h-5 min-h-5 w-9 shrink-0 cursor-pointer items-center rounded-full px-[3px] mx-[1px] transition {state
? ' bg-emerald-600'
: 'bg-gray-200 dark:bg-transparent'} outline outline-1 outline-gray-100 dark:outline-gray-800"