mapcomplete/UI/Base/Checkbox.svelte

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
324 B
Svelte
Raw Normal View History

2023-03-28 05:13:48 +02:00
<script lang="ts">
import { UIEventSource } from "../../Logic/UIEventSource.js"
2023-03-28 05:13:48 +02:00
/**
* For some stupid reason, it is very hard to bind inputs
*/
export let selected: UIEventSource<boolean>
let _c: boolean = selected.data ?? true
2023-03-28 05:13:48 +02:00
$: selected.setData(_c)
</script>
<input type="checkbox" bind:checked={_c} />