@cypress-design/react-modal 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -31069,20 +31069,21 @@ var Modal = function (_a) {
31069
31069
  React__namespace.useEffect(function () { return function () {
31070
31070
  freeBodyScroll();
31071
31071
  }; }, []);
31072
- return (React__namespace.createElement(React__namespace.Fragment, null, reactDomExports.createPortal(React__namespace.createElement("div", null,
31073
- show ? (React__namespace.createElement("div", { className: ClassBackDrop, onClick: function () { return onClose === null || onClose === void 0 ? void 0 : onClose(); } })) : null,
31074
- show ? (React__namespace.createElement("div", { className: ClassModalContainer, tabIndex: -1, "aria-modal": "true", role: "modal" },
31075
- React__namespace.createElement("div", { className: ClassModal },
31076
- React__namespace.createElement("div", { className: ClassTitleBox },
31077
- React__namespace.createElement("div", { className: ClassTitle }, title),
31078
- helpLink ? React__namespace.createElement("div", { className: ClassHelpLinkDash }) : null,
31079
- helpLink ? (React__namespace.createElement("a", { href: helpLink, className: ClassHelpLink },
31080
- "Need help",
31081
- React__namespace.createElement(IconActionQuestionMarkCircle, { className: "ml-[4px]", "stroke-color": "indigo-500", "fill-color": "indigo-100" }))) : null,
31082
- React__namespace.createElement("div", { className: "grow" }),
31083
- React__namespace.createElement("button", { "aria-label": "Close", className: ClassCloseButton, onClick: function () { return onClose === null || onClose === void 0 ? void 0 : onClose(); } },
31084
- React__namespace.createElement(IconActionDelete, { className: "children:transition-all", "stroke-color": "gray-400", "hover-stroke-color": "gray-700", interactiveColorsOnGroup: true }))),
31085
- React__namespace.createElement("div", { className: ClassContent }, children)))) : null), document.body)));
31072
+ return (show &&
31073
+ reactDomExports.createPortal(React__namespace.createElement("div", null,
31074
+ React__namespace.createElement("div", { className: ClassBackDrop, onClick: function () { return onClose === null || onClose === void 0 ? void 0 : onClose(); } }),
31075
+ React__namespace.createElement("div", { className: ClassModalContainer, tabIndex: -1, "aria-modal": "true", role: "modal" },
31076
+ React__namespace.createElement("div", { className: ClassModal },
31077
+ React__namespace.createElement("div", { className: ClassTitleBox },
31078
+ React__namespace.createElement("div", { className: ClassTitle }, title),
31079
+ helpLink ? React__namespace.createElement("div", { className: ClassHelpLinkDash }) : null,
31080
+ helpLink ? (React__namespace.createElement("a", { href: helpLink, className: ClassHelpLink },
31081
+ "Need help",
31082
+ React__namespace.createElement(IconActionQuestionMarkCircle, { className: "ml-[4px]", "stroke-color": "indigo-500", "fill-color": "indigo-100" }))) : null,
31083
+ React__namespace.createElement("div", { className: "grow" }),
31084
+ React__namespace.createElement("button", { "aria-label": "Close", className: ClassCloseButton, onClick: function () { return onClose === null || onClose === void 0 ? void 0 : onClose(); } },
31085
+ React__namespace.createElement(IconActionDelete, { className: "children:transition-all", "stroke-color": "gray-400", "hover-stroke-color": "gray-700", interactiveColorsOnGroup: true }))),
31086
+ React__namespace.createElement("div", { className: ClassContent }, children)))), document.body));
31086
31087
  };
31087
31088
 
31088
31089
  module.exports = Modal;