| 47 | } |
| 48 | |
| 49 | function DialogContent({ |
| 50 | className, |
| 51 | children, |
| 52 | ...props |
| 53 | }: React.ComponentProps<typeof DialogPrimitive.Content>) { |
| 54 | return ( |
| 55 | <DialogPortal data-slot="dialog-portal"> |
| 56 | <DialogOverlay /> |
| 57 | <DialogPrimitive.Content |
| 58 | data-slot="dialog-content" |
| 59 | className={cn( |
| 60 | "bg-white dark:bg-zinc-900 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-gray-200 dark:border-zinc-800 p-6 shadow-lg duration-200 sm:max-w-lg", |
| 61 | className |
| 62 | )} |
| 63 | {...props} |
| 64 | > |
| 65 | {children} |
| 66 | <DialogPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"> |
| 67 | <XIcon /> |
| 68 | <span className="sr-only">Close</span> |
| 69 | </DialogPrimitive.Close> |
| 70 | </DialogPrimitive.Content> |
| 71 | </DialogPortal> |
| 72 | ) |
| 73 | } |
| 74 | |
| 75 | function DialogHeader({ className, ...props }: React.ComponentProps<"div">) { |
| 76 | return ( |