diff --git a/docs/content/docs/api/modals-component.mdx b/docs/content/docs/api/modals-component.mdx index c8be0de..5a6ca64 100644 --- a/docs/content/docs/api/modals-component.mdx +++ b/docs/content/docs/api/modals-component.mdx @@ -2,8 +2,6 @@ title: layout: $lib/layouts/BaseLayout.astro --- -import { Code } from '@astrojs/starlight/components'; -import ModalsDTS from '../../../../dist/modals-context.svelte.d.ts?raw' Renders the current stack of modals diff --git a/docs/content/docs/api/modals.mdx b/docs/content/docs/api/modals.mdx index 83c973d..386a180 100644 --- a/docs/content/docs/api/modals.mdx +++ b/docs/content/docs/api/modals.mdx @@ -3,7 +3,7 @@ title: modals layout: $lib/layouts/BaseLayout.astro --- import { Code, Badge} from '@astrojs/starlight/components'; -import ModalsDTS from '../../../../dist/modals-context.svelte.d.ts?raw' +import ModalsDTS from '../../../../dist/modal-stack.svelte.d.ts?raw' The main entry point for the modals API. diff --git a/src/lib/ModalContext.svelte b/src/lib/ModalContext.svelte index 75fcd36..ac33e0a 100644 --- a/src/lib/ModalContext.svelte +++ b/src/lib/ModalContext.svelte @@ -3,11 +3,11 @@ import { on } from 'svelte/events' const key = Symbol('modal') - function setModal(modal: Modal) { + function setModal(modal: StackedModal) { setContext(key, modal) } - export function getModal(): Modal { + export function getModal(): StackedModal { return getContext(key) } @@ -43,9 +43,9 @@ diff --git a/src/lib/Modals.svelte b/src/lib/Modals.svelte index fc9640f..650dddb 100644 --- a/src/lib/Modals.svelte +++ b/src/lib/Modals.svelte @@ -1,27 +1,27 @@