Add burrow support

This commit is contained in:
Jon Staab
2024-11-26 16:39:49 -08:00
parent 220f26253d
commit a58fc68235
16 changed files with 375 additions and 55 deletions
+3 -1
View File
@@ -7,6 +7,7 @@ export type ModalOptions = {
drawer?: boolean
fullscreen?: boolean
replaceState?: boolean
path?: string
}
export type Modal = {
@@ -26,10 +27,11 @@ export const pushModal = (
options: ModalOptions = {},
) => {
const id = randomId()
const path = options.path || ""
modals.update(assoc(id, {id, component, props, options}))
goto("#" + id, {replaceState: options.replaceState})
goto(path + "#" + id, {replaceState: options.replaceState})
return id
}