UNPKG

ur-ui-kit-tm

Version:
39 lines (38 loc) 1.6 kB
var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import ReactModal from "react-modal"; import { ModalTitle, ModalBody, ModalHeader, WholeWrapper } from "./modal.styled"; var customStyles = { overlay: { backgroundColor: "#08183f21", zIndex: 3333, }, content: { top: "50%", left: "50%", right: "auto", bottom: "auto", marginRight: "-50%", transform: "translate(-50%, -50%)", boxShadow: "0px 4px 10px rgba(0, 147, 198, 0.18)", borderRadius: "2rem", border: " 2px solid #0096C6", padding: 0, maxWidth: "80vw", width: "688px", }, }; export var Modal = function (_a) { var isOpen = _a.isOpen, onRequestClose = _a.onRequestClose, title = _a.title, children = _a.children; return (_jsx(ReactModal, __assign({ ariaHideApp: false, isOpen: isOpen, style: customStyles, onRequestClose: function () { return onRequestClose(); } }, { children: _jsxs(WholeWrapper, { children: [_jsx(ModalHeader, { children: _jsx(ModalTitle, { children: title }, void 0) }, void 0), _jsx(ModalBody, { children: children }, void 0)] }, void 0) }), void 0)); };