Add remaining Switch tests

This commit is contained in:
Ryan Gossiaux
2021-12-25 15:57:35 -08:00
parent 1156a0923e
commit ea8693e1ec
3 changed files with 652 additions and 2 deletions

View 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>