<script>
import Modal from './Modal.svelte';
import Toggle from './Toggle.svelte';
import { modal } from './modal';
let name = 'world';
$: $modal.status
</script>
<h1>Hello {name}!</h1>
<button>
1
</button>
<button>
2
</button>
<button>
3
</button>
<button>
4
</button>
<Toggle />
{#if $modal.status === 'opened'}
<Modal title={$modal.title}>
<svelte:component this={$modal.component} {...$modal.params} />
</Modal>
{/if}