import './Modal.css';
import {useModalContext} from "@/components/Modal/ModalContext";
import {ReactNode} from "react";

export default function Modal({children}:{
    children: ReactNode;
}) {
    const { setContentModal } = useModalContext();

    return (
        <div id="modal" className="modal">
            <div className="modal-content">
                <span className="close-btn" onClick={() => setContentModal(null)} id="closeModalBtn">&times;</span>
                {children}
            </div>
        </div>
    );
}
