2023-03-28 05:13:48 +02:00
|
|
|
<script lang="ts">
|
2023-12-13 01:01:56 +01:00
|
|
|
import { UIEventSource } from "../../Logic/UIEventSource"
|
2023-03-28 05:13:48 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* For some stupid reason, it is very hard to bind inputs
|
|
|
|
*/
|
2023-12-13 01:01:56 +01:00
|
|
|
export let selected: UIEventSource<boolean>
|
2023-09-28 23:50:27 +02:00
|
|
|
let _c: boolean = selected.data ?? true
|
|
|
|
$: selected.set(_c)
|
2023-03-28 05:13:48 +02:00
|
|
|
</script>
|
2023-09-28 23:50:27 +02:00
|
|
|
|
2023-12-13 01:01:56 +01:00
|
|
|
<label class="no-image-background flex items-center gap-1">
|
2023-09-28 03:07:10 +02:00
|
|
|
<input bind:checked={_c} type="checkbox" />
|
|
|
|
<slot />
|
|
|
|
</label>
|