added drawers

This commit is contained in:
munimunigamer 2026-01-22 01:19:57 -06:00
parent 994a4adab2
commit 416e3d35cf
70 changed files with 2274 additions and 2566 deletions

View file

@ -0,0 +1,22 @@
<script lang="ts">
import * as Dialog from "$lib/components/ui/dialog";
import * as Drawer from "$lib/components/ui/drawer";
import { getResponsiveModalContext } from "./context";
import { cn } from "$lib/utils/cn";
let { children, class: className, ...props } = $props();
const { isMobile } = getResponsiveModalContext();
</script>
{#if isMobile.current}
<Drawer.Content
class={cn("max-h-[85vh] h-auto p-0 pb-[env(safe-area-inset-bottom)]", className)}
{...props}
>
{@render children?.()}
</Drawer.Content>
{:else}
<Dialog.Content class={className} {...props}>
{@render children?.()}
</Dialog.Content>
{/if}