Merge pull request #2685 from foucist/master

Make modal example more obvious
pull/2698/head
Rich Harris 5 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>
import Modal from './Modal.svelte';
let showModal = true;
let showModal = false;
</script>
<button on:click="{() => showModal = true}">
show modal
</button>
{#if showModal}
<Modal on:close="{() => showModal = false}">
<h2 slot="header">
@ -22,8 +26,4 @@
<a href="https://www.merriam-webster.com/dictionary/modal">merriam-webster.com</a>
</Modal>
{:else}
<button on:click="{() => showModal = true}">
show modal
</button>
{/if}
{/if}

Loading…
Cancel
Save