Skip to content

Instantly share code, notes, and snippets.

@julianpinedayyz
Created May 9, 2022 02:01
Show Gist options
  • Save julianpinedayyz/2e98dffaf4db68e55ac1cb32b6fbea80 to your computer and use it in GitHub Desktop.
Save julianpinedayyz/2e98dffaf4db68e55ac1cb32b6fbea80 to your computer and use it in GitHub Desktop.
Svelte Modal
<script>
import { Button, ModalCard } from 'svelma'
let active = false
</script>
<Button class="block" on:click={() => active = !active}>Toggle</Button>
<ModalCard bind:active={active} title="My Modal Title">
<p class="image is-4by3">
<img alt="Test image" src="https://via.placeholder.com/1280x920"/>
</p>
</ModalCard>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment