import React from 'react'; import { Dialog, DialogContent, DialogHeader, DialogTitle } from '../Dialog'; import { cn } from '../../lib/utils'; export interface ModalProps { isOpen: boolean; onClose: () => void; title?: string; children: React.ReactNode; contentClassName?: string; shouldCloseOnEsc?: boolean; shouldCloseOnOverlayClick?: boolean; containerClassName?: string; } const Modal: React.FC = ({ isOpen, onClose, title, children, shouldCloseOnEsc = true, shouldCloseOnOverlayClick = true, containerClassName, }) => { return ( !open && onClose()} shouldCloseOnEsc={shouldCloseOnEsc} shouldCloseOnOverlayClick={shouldCloseOnOverlayClick} > {title && ( {title} )}
{children}
); }; export default Modal;