1.0.7 • Published 3 months ago
@svelte-put/modal v1.0.7
@svelte-put/modal
Solution to async & type-safe modals in Svelte.
This solution employs svelte store for handling stack-able modals in an async manner. That is, you can open a modal programmatically and await for it to be "resolved".
svelte-put
This package is part of the @svelte-put family. For contributing guideline and more, refer to its readme.
Usage & Documentation
See the dedicated documentation page here.
Quick Start
// setup modal store
import { createModalStore } from '@svelte-put/modal';
export const modalStore = createModalStore();
<!-- setup ModalPortal -->
<script lang="ts">
import ModalPortal from '@svelte-put/modal/ModalPortal.svelte';
import { modalStore } from './modal.store';
</script>
<slot />
<ModalPortal store="{modalStore}" />
// load compatible modal & push/pop
import { modalStore } from './modal.store';
import MyModal from './MyModal.svelte';
const pushed = modal.push(MyModal, {
/* props */
});
modal.pop(pushed);
Changelog
1.0.7
3 months ago
1.0.6
4 months ago
1.0.5
5 months ago
1.0.2
10 months ago
1.0.1
10 months ago
1.0.4
5 months ago
1.0.3
6 months ago
1.0.0
1 year ago
0.6.3
1 year ago
0.6.2
1 year ago
0.6.1
1 year ago
0.5.4
2 years ago
0.5.3
2 years ago
0.5.6
1 year ago
0.5.5
2 years ago
0.5.2
2 years ago
0.6.0
1 year ago
0.5.1
2 years ago
0.5.0
2 years ago
0.4.4
2 years ago
0.4.3
2 years ago
0.4.2
2 years ago
0.4.1
2 years ago
0.4.0
2 years ago
0.3.0
2 years ago
0.2.1
2 years ago
0.2.0
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago