diff --git a/packages/webui/src/components/ui/dialog.tsx b/packages/webui/src/components/ui/dialog.tsx index 91a115d8..f413feb6 100644 --- a/packages/webui/src/components/ui/dialog.tsx +++ b/packages/webui/src/components/ui/dialog.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; import * as DialogPrimitive from '@radix-ui/react-dialog'; import { X } from 'lucide-react'; +import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; const Dialog = DialogPrimitive.Root; @@ -36,18 +37,27 @@ const DialogContent = React.forwardRef< // phones (plain `w-full` made the dialog touch both edges). Callers // only ever override `max-w-*` (the desktop cap), so the width floor // here survives those overrides — width and max-width are distinct. - 'fixed left-1/2 top-1/2 z-50 grid w-[calc(100vw_-_2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border bg-card p-6 shadow-lg outline-none', + 'fixed left-1/2 top-1/2 z-50 max-h-[calc(100dvh_-_2rem)] w-[calc(100vw_-_2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-xl border bg-card shadow-lg outline-none', 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95', className )} {...props} > - {children} +
+ {children} +
{showClose && ( - - - Close + + )} diff --git a/packages/webui/src/components/ui/sheet.tsx b/packages/webui/src/components/ui/sheet.tsx index 0cee823f..d910983d 100644 --- a/packages/webui/src/components/ui/sheet.tsx +++ b/packages/webui/src/components/ui/sheet.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import * as DialogPrimitive from '@radix-ui/react-dialog'; import { X } from 'lucide-react'; import { cva, type VariantProps } from 'class-variance-authority'; +import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; const Sheet = DialogPrimitive.Root; @@ -52,9 +53,16 @@ const SheetContent = React.forwardRef {children} {showClose && ( - - - Close + + )}