forked from EduCraft/curriculum-project-hub
cbe569d7e6
Run `prettier --write .` across all source files. Changes are purely formatting: trailing commas, line wrapping at 120 chars, import reordering, and CSS whitespace. No logic changes. Verified with `prettier --check .` and `svelte-check` (0 errors, 0 warnings).
28 lines
485 B
Svelte
28 lines
485 B
Svelte
<script lang="ts">
|
|
import { Switch } from 'bits-ui';
|
|
|
|
let {
|
|
checked = $bindable(false),
|
|
disabled = false,
|
|
class: className = '',
|
|
onchange,
|
|
}: {
|
|
checked?: boolean;
|
|
disabled?: boolean;
|
|
class?: string;
|
|
onchange?: (checked: boolean) => void;
|
|
} = $props();
|
|
</script>
|
|
|
|
<Switch.Root
|
|
class="saas-switch {className}"
|
|
{disabled}
|
|
{checked}
|
|
onCheckedChange={(next) => {
|
|
checked = next;
|
|
onchange?.(next);
|
|
}}
|
|
>
|
|
<Switch.Thumb class="saas-switch-thumb" />
|
|
</Switch.Root>
|