{"size": 418, "ext": "js", "max_stars_repo_path": "src/Modal/Modal.js", "max_stars_repo_name": "Guy6767/finder-clone", "max_stars_repo_stars_event_min_datetime": "2021-04-16T11:33:38.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-18T07:21:33.000Z", "max_issues_repo_path": "src/Modal/Modal.js", "max_issues_repo_name": "izhar360/macOS-Finder", "max_issues_repo_issues_event_min_datetime": "2021-06-09T01:40:41.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-10T01:36:01.000Z", "max_forks_repo_path": "src/Modal/Modal.js", "max_forks_repo_name": "SetuCoder/finder-clone", "max_forks_repo_forks_event_min_datetime": "2021-04-16T13:43:36.000Z", "max_forks_repo_forks_event_max_datetime": "2021-04-16T16:50:32.000Z"}
{"max_stars_count": 32, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 19.9047619048, "max_line_length": 55, "alphanum_fraction": 0.6674641148}
import ReactModal from "react-modal";
import "./Modal.scss";

function Modal({ modalIsOpen, closeModal, children }) {
  ReactModal.setAppElement("#root");

  return (
    <ReactModal
      isOpen={modalIsOpen}
      onRequestClose={closeModal}
      className="modal"
      overlayClassName="modal-overlay"
      shouldCloseOnOverlayClick={false}
    >
      {children}
    </ReactModal>
  );
}

export default Modal;
