mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
251 B
17 lines
251 B
4 years ago
|
<script>
|
||
|
let options = [1,2,3]
|
||
|
export let selected = [[1,2,3]];
|
||
|
</script>
|
||
|
|
||
|
{#each options as value}
|
||
|
<label>
|
||
|
<input
|
||
|
type='checkbox'
|
||
|
bind:group={selected[0]}
|
||
|
value={value}
|
||
|
/>
|
||
|
{value}
|
||
|
</label>
|
||
|
{/each}
|
||
|
|
||
|
<p>{selected[0].join(', ')}</p>
|