25 lines
385 B
Svelte
25 lines
385 B
Svelte
<script>
|
|
import Note from './Note.svelte'
|
|
import { createEventDispatcher } from 'svelte'
|
|
const dispatch = createEventDispatcher()
|
|
|
|
function handleToggle(e) {
|
|
dispatch("toggle", e.detail)
|
|
}
|
|
|
|
export let notes = []
|
|
|
|
</script>
|
|
|
|
<section>
|
|
{#each notes as note}
|
|
<Note note={note} on:toggle={handleToggle} />
|
|
{/each}
|
|
</section>
|
|
|
|
<style>
|
|
section {
|
|
margin-top: 1rem;
|
|
}
|
|
</style>
|