Migrate more stuff

This commit is contained in:
Jon Staab
2025-02-03 16:37:14 -08:00
parent 0f705c459a
commit 8d3433b167
150 changed files with 2001 additions and 1205 deletions
+12 -6
View File
@@ -2,12 +2,18 @@
import {noop} from "@welshman/lib"
import {fade, fly} from "@lib/transition"
export let onClose: any = noop
export let fullscreen = false
interface Props {
onClose?: any
fullscreen?: boolean
children?: import("svelte").Snippet
}
$: extraClass =
let {onClose = noop, fullscreen = false, children}: Props = $props()
let extraClass = $derived(
!fullscreen &&
"card2 bg-alt max-h-[90vh] w-[90vw] overflow-auto text-base-content sm:w-[520px] shadow-xl"
"card2 bg-alt max-h-[90vh] w-[90vw] overflow-auto text-base-content sm:w-[520px] shadow-xl",
)
</script>
<div class="center fixed inset-0 z-modal">
@@ -15,9 +21,9 @@
aria-label="Close dialog"
class="absolute inset-0 cursor-pointer bg-black opacity-75"
transition:fade={{duration: 300}}
on:click={onClose}>
onclick={onClose}>
</button>
<div class="scroll-container relative {extraClass}" transition:fly={{duration: 300}}>
<slot />
{@render children?.()}
</div>
</div>