diff --git a/components/ui/dialog.tsx b/components/ui/dialog.tsx
index 6ac7ded..9c5e3e9 100644
--- a/components/ui/dialog.tsx
+++ b/components/ui/dialog.tsx
@@ -3,55 +3,86 @@
import * as React from 'react';
import { useState } from 'react';
import * as DialogPrimitive from '@radix-ui/react-dialog';
-import { X } from 'lucide-react';
import { cn } from '@/lib/utils';
const Dialog = DialogPrimitive.Root;
-const DialogPortal = ({ ...props }: DialogPrimitive.DialogPortalProps) => ;
-DialogPortal.displayName = DialogPrimitive.Portal.displayName;
+const DialogTrigger = DialogPrimitive.Trigger;
+
+const DialogPortal = DialogPrimitive.Portal;
+
+const DialogClose = DialogPrimitive.Close;
const DialogOverlay = React.forwardRef<
React.ElementRef,
React.ComponentPropsWithoutRef
->(({ className, children, ...props }, ref) => (
-
-
- {children}
-
+>(({ className, ...props }, ref) => (
+
+ {props?.children}
));
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
const DialogContent = React.forwardRef<
React.ElementRef,
- React.ComponentPropsWithoutRef & { onClose?: () => void }
->(({ className, children, ...props }, ref) => {
- return (
-
-
-
-
-
- );
-});
+ React.ComponentPropsWithoutRef
+>(({ className, children, ...props }, ref) => (
+
+
+
+ {children}
+
+
+
+
+));
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;
+
const Modal: React.FC<{
children: React.ReactNode;
className?: string;
@@ -60,18 +91,27 @@ const Modal: React.FC<{
const [open, setOpen] = useState(true);
const handleClose = () => {
- console.log(onClose());
- console.log('closing');
+ onClose?.();
setOpen(false);
};
return (
);
};
-export { Dialog, DialogContent, Modal };
+export {
+ Dialog,
+ DialogClose,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogOverlay,
+ DialogPortal,
+ DialogTitle,
+ DialogTrigger,
+ Modal
+};