"use client" import * as React from 'react'; import * as DialogPrimitive from '@radix-ui/react-dialog'; import { Cross2Icon } from '@radix-ui/react-icons'; import { cn } from '../../../lib/utils'; const Dialog = DialogPrimitive.Root const DialogTrigger = DialogPrimitive.Trigger const DialogPortal = DialogPrimitive.Portal const DialogClose = DialogPrimitive.Close const DialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, style, ...props }, ref) => ( )) DialogOverlay.displayName = DialogPrimitive.Overlay.displayName interface DialogContentProps extends React.ComponentPropsWithoutRef { /** * Stretch the content to fill the viewport (`100dvw × 100dvh`) and drop * the centred-card chrome (no `max-w`, no `rounded`, no `border`, no * default padding). Use for full-screen pickers, galleries, onboarding. */ fullscreen?: boolean /** * Close affordance shown in the top-right corner. * - `undefined` (default): renders the built-in `X` button. * - `false`: no close button — use this when the surrounding UI provides * its own close trigger (or the dialog has no dismiss). * - `ReactNode`: replaces the built-in button. Wrap your node in * `DialogClose` so it dismisses the dialog. */ closeButton?: React.ReactNode | false } const DialogContent = React.forwardRef< React.ElementRef, DialogContentProps >(({ className, children, fullscreen = false, closeButton, ...props }, ref) => ( {children} {closeButton === undefined ? ( Close ) : closeButton === false ? null : ( closeButton )} )) DialogContent.displayName = DialogPrimitive.Content.displayName const DialogHeader = ({ className, ...props }: React.HTMLAttributes) => (
) DialogHeader.displayName = "DialogHeader" const DialogFooter = ({ className, ...props }: React.HTMLAttributes) => (
) DialogFooter.displayName = "DialogFooter" const DialogTitle = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( )) DialogTitle.displayName = DialogPrimitive.Title.displayName const DialogDescription = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( )) DialogDescription.displayName = DialogPrimitive.Description.displayName export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, }