Last active
February 2, 2021 23:22
-
-
Save Chico-Chen/80217680a7d91f307615b3fee356406d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import { createEventDispatcher } from "svelte"; | |
import Button from "./Button.svelte"; | |
const dispatch = createEventDispatcher(); | |
function closeModal() { | |
dispatch("cancel"); | |
} | |
</script> | |
<div class="modal-backdrop" on:click={closeModal} /> | |
<div class="modal"> | |
<h2>CheckList</h2> | |
<div class="content"> | |
<slot /> | |
</div> | |
<footer> | |
<slot name="footer"> | |
<Button on:click={closeModal}>Close</Button> | |
</slot> | |
</footer> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment