Add remaining Switch tests
This commit is contained in:
11
src/lib/components/switch/_ManagedSwitch.svelte
Normal file
11
src/lib/components/switch/_ManagedSwitch.svelte
Normal file
@@ -0,0 +1,11 @@
|
||||
<script lang="ts">
|
||||
import Switch from "./Switch.svelte";
|
||||
|
||||
// This component is only for use in tests
|
||||
export let initialChecked = false;
|
||||
let state = initialChecked;
|
||||
</script>
|
||||
|
||||
<Switch checked={state} on:change={(e) => (state = e.detail)} on:change>
|
||||
<slot />
|
||||
</Switch>
|
||||
Reference in New Issue
Block a user