import React, { ReactNode } from 'react'; import { X } from 'lucide-react'; import { Button } from './ui/button'; interface CustomModalProps { isOpen: boolean; onClose: () => void; title?: string; children: ReactNode; maxWidth?: string; showCloseButton?: boolean; } const CustomModal: React.FC = ({ isOpen, onClose, title, children, maxWidth = 'max-w-4xl', showCloseButton = true, }) => { if (!isOpen) return null; return (
e.stopPropagation()} > {(title || showCloseButton) && (
{title &&

{title}

} {showCloseButton && ( )}
)}
{children}
); }; export default CustomModal;