hh-ui-components
Version:
14 lines • 1.2 kB
JavaScript
import React from "react";
import ModalCloseIcon from "./ModalCloseIcon";
export var Modal = function (_a) {
var children = _a.children, title = _a.title, onClick = _a.onClick, open = _a.open, label = _a.label;
return (React.createElement(React.Fragment, null, open ? (React.createElement("div", { className: "w-screen h-screen bg-black bg-opacity-50" },
React.createElement("div", { className: "fixed z-50 top-2/4 left-2/4 -translate-x-2/4 -translate-y-2/4 bg-warmTone-2 rounded-[5px] 2xl:rounded-[0.347vw] p-30 lg:p-40 2xl:p-40-2xl w-full max-w-[calc(100%-40px)] md:max-w-[543px] lg:max-w-[543px] 2xl:max-w-[37.708vw]" },
React.createElement("div", { className: "" },
React.createElement("div", { className: "flex items-center justify-between w-full mb-20 lg:mb-20 2xl:mb-20-2xl" },
React.createElement("h5", { "aria-label": label || "Modal label" }, title),
React.createElement("div", { className: "relative block", onClick: onClick },
React.createElement(ModalCloseIcon, { className: "w-6 h-6 cursor-pointer" }))),
children)))) : null));
};
//# sourceMappingURL=Modal.js.map