<script>
import Modal from "./Modal.svelte";
</script>
<main>
<h1>With slot content</h1>
<Modal>
<p>Hello, World!</p>
<div slot="actions">
<button>Click me</button>
</div>
</Modal>
<h1>Without slot content</h1>
<Modal>
<p>Hello, World!</p>
</Modal>
</main>
<style>
:global(body) {
background: MediumPurple;
padding: 2rem;
}
main {
max-width: 30rem;
margin: 0 auto;
}
h1 {
color: white;
margin: 2rem 0;
}
button {
background: DodgerBlue;
border-radius: 0.5rem;
color: white;