mirror of
https://github.com/AventurasTeam/Aventuras.git
synced 2026-04-28 20:00:57 +00:00
added drawers
This commit is contained in:
parent
994a4adab2
commit
416e3d35cf
70 changed files with 2274 additions and 2566 deletions
|
|
@ -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}
|
||||
Loading…
Add table
Add a link
Reference in a new issue