"use client" import * as React from "react" import { Dialog as DialogPrimitive } from "radix-ui" import { cn } from "@/lib/utils" import { Button } from "@/components/ui/button" import { XIcon } from "lucide-react" function Dialog({ ...props }: React.ComponentProps) { return } function DialogTrigger({ ...props }: React.ComponentProps) { return } const subscribeToNothing = () => () => {} function DialogPortal({ ...props }: React.ComponentProps) { // Radix's Portal calls createPortal(children, document.body) as soon as it // renders. During static prerendering there's no `document`, so gate the // portal on the client snapshot, which is only read in the browser. Closed // dialogs render nothing on the server anyway, so there's no visual/ // hydration change. const mounted = React.useSyncExternalStore( subscribeToNothing, () => true, () => false ) if (!mounted) return null return } function DialogClose({ ...props }: React.ComponentProps) { return } function DialogOverlay({ className, ...props }: React.ComponentProps) { return ( ) } function DialogContent({ className, children, showCloseButton = true, ...props }: React.ComponentProps & { showCloseButton?: boolean }) { return ( {children} {showCloseButton && ( )} ) } function DialogHeader({ className, ...props }: React.ComponentProps<"div">) { return (
) } function DialogFooter({ className, showCloseButton = false, children, ...props }: React.ComponentProps<"div"> & { showCloseButton?: boolean }) { return (
{children} {showCloseButton && ( )}
) } function DialogTitle({ className, ...props }: React.ComponentProps) { return ( ) } function DialogDescription({ className, ...props }: React.ComponentProps) { return ( ) } export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, }