/*!
 * Copyright 2017 by ChartIQ, Inc.
 * All rights reserved.
 */
import React from "react";
/**
 * The image modal (light box)
 * @param {object} props Component props
 * @param {func} props.closeModal Parent function to close the modal. Actual display is handled by CSS
 * @param {object} props.children The inner contents (elements) of the array
 */
const Modal = ({ open, closeModal, children }) => {
    let modalClassName = "modal";
    if (open) {
        modalClassName = `${modalClassName} open`;
    }
    else {
        modalClassName = `${modalClassName} closed`;
    }
    return (React.createElement("div", { className: modalClassName, onClick: closeModal },
        React.createElement("div", { className: "modal-main" }, children)));
};
export default Modal;
//# sourceMappingURL=Modal.js.map