Work on add space modal

This commit is contained in:
Jon Staab
2024-08-08 14:02:46 -07:00
parent fb04a68168
commit 6c2e5d6e07
17 changed files with 232 additions and 107 deletions
+32
View File
@@ -0,0 +1,32 @@
<script context="module" lang="ts">
const modalHeight = tweened(0, {
duration: 700,
easing: quintOut
})
</script>
<script lang="ts">
import {onMount} from 'svelte'
import {slide} from 'svelte/transition'
import {quintOut} from 'svelte/easing'
import {tweened} from 'svelte/motion'
import {last} from '@welshman/lib'
export let component
export let props
let box: HTMLElement
let content: HTMLElement
let naturalHeight = 0
onMount(() => {
naturalHeight = content.clientHeight + 48
$modalHeight = naturalHeight
})
</script>
<div class="modal-box" bind:this={box} style={`height: ${$modalHeight}px`} class:overflow-hidden={$modalHeight !== naturalHeight}>
<div bind:this={content}>
<svelte:component this={component} {...props} />
</div>
</div>