chat feature added

This commit is contained in:
Timothy J. Baek 2023-10-08 15:38:42 -07:00
parent 5cd4946df2
commit 5e03670f1e
34 changed files with 7276 additions and 0 deletions

View file

@ -0,0 +1,40 @@
<script lang="ts">
import { onMount } from 'svelte';
import { fade, blur } from 'svelte/transition';
export let show = true;
let mounted = false;
onMount(() => {
mounted = true;
});
$: if (mounted) {
if (show) {
document.body.style.overflow = 'hidden';
} else {
document.body.style.overflow = 'unset';
}
}
</script>
{#if show}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="fixed top-0 right-0 left-0 bottom-0 bg-stone-900/50 w-full min-h-screen h-screen flex justify-center z-50 overflow-hidden overscroll-contain"
on:click={() => {
show = false;
}}
>
<div
class="m-auto min-h-52 max-w-full w-[30rem] bg-stone-800 rounded-lg p-5 mx-3 shadow-3xl"
transition:fade={{ delay: 100, duration: 200 }}
on:click={(e) => {
e.stopPropagation();
}}
>
<slot />
</div>
</div>
{/if}