import React from "react"; interface ModalProps { isOpen: boolean; // Whether the modal is open or not onClose: () => void; // Function to close the modal children: React.ReactNode; // Content to be displayed inside the modal } const Modal: React.FC = ({ isOpen, onClose, children }) => { if (!isOpen) return null; return (
{children}
); }; export default Modal;