Merge pull request #2685 from foucist/master

Make modal example more obvious
pull/2698/head
Rich Harris 6 years ago committed by GitHub
commit 11168cf076
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,9 +1,13 @@
<script> <script>
import Modal from './Modal.svelte'; import Modal from './Modal.svelte';
let showModal = true; let showModal = false;
</script> </script>
<button on:click="{() => showModal = true}">
show modal
</button>
{#if showModal} {#if showModal}
<Modal on:close="{() => showModal = false}"> <Modal on:close="{() => showModal = false}">
<h2 slot="header"> <h2 slot="header">
@ -22,8 +26,4 @@
<a href="https://www.merriam-webster.com/dictionary/modal">merriam-webster.com</a> <a href="https://www.merriam-webster.com/dictionary/modal">merriam-webster.com</a>
</Modal> </Modal>
{:else}
<button on:click="{() => showModal = true}">
show modal
</button>
{/if} {/if}
Loading…
Cancel
Save