Skip to content

Commit b4cc9f4

Browse files
committed
Make modal example more obvious
1 parent 6f6e28c commit b4cc9f4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/14-composition/04-modal/App.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
<script>
22
import Modal from './Modal.svelte';
33
4-
let showModal = true;
4+
let showModal = false;
55
</script>
66

7+
<button on:click="{() => showModal = true}">
8+
show modal
9+
</button>
10+
711
{#if showModal}
812
<Modal on:close="{() => showModal = false}">
913
<h2 slot="header">
@@ -22,8 +26,4 @@
2226

2327
<a href="https://www.merriam-webster.com/dictionary/modal">merriam-webster.com</a>
2428
</Modal>
25-
{:else}
26-
<button on:click="{() => showModal = true}">
27-
show modal
28-
</button>
29-
{/if}
29+
{/if}

0 commit comments

Comments
 (0)