@@ -553,17 +553,18 @@ var React = __webpack_require__(/*! react */ "./node_modules/react/index.js");
553
553
var react_fontawesome_1 = __webpack_require__(/*! @fortawesome/react-fontawesome */ "./node_modules/@fortawesome/react-fontawesome/index.es.js");
554
554
var free_solid_svg_icons_1 = __webpack_require__(/*! @fortawesome/free-solid-svg-icons */ "./node_modules/@fortawesome/free-solid-svg-icons/index.es.js");
555
555
var NotificationModal = function (props) {
556
+ var _a = React.useState(false), forceClosed = _a[0], setForceClosed = _a[1];
556
557
var buttonAnchor = props.buttonAnchor, modalTitle = props.modalTitle, modalContent = props.modalContent;
557
- return (React.createElement("section", { className: "modal--show is-active", id: buttonAnchor, tabIndex: -1, role: "dialog", "aria-labelledby": "modal-label", "aria-hidden": "true" },
558
+ return (React.createElement("section", { className: "modal--show is-active", id: buttonAnchor, tabIndex: -1, role: "dialog", "aria-labelledby": "modal-label", "aria-hidden": "true", style: forceClosed ? { display: 'none' } : {} },
558
559
React.createElement("div", { className: "modal-inner" },
559
560
React.createElement("header", { id: "modal-label" },
560
561
React.createElement("h2", null, modalTitle)),
561
562
React.createElement("div", { className: "modal-content", dangerouslySetInnerHTML: { __html: modalContent } }),
562
563
React.createElement("footer", { className: "flex x-space-around" },
563
- React.createElement("a", { href: "#!", className: "button" },
564
+ React.createElement("a", { href: "#!", onClick: function () { return setForceClosed(true); }, className: "button" },
564
565
"Close",
565
566
React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faTimes })))),
566
- React.createElement("a", { href: "#!", className: "modal-close", title: "Close this modal", "data-close": "Close", "data-dismiss": "modal" }, "?")));
567
+ React.createElement("a", { href: "#!", onClick: function () { return setForceClosed(true); }, className: "modal-close", title: "Close this modal", "data-close": "Close", "data-dismiss": "modal" }, "?")));
567
568
};
568
569
exports["default"] = NotificationModal;
569
570
@@ -2145,8 +2146,9 @@ var React = __webpack_require__(/*! react */ "./node_modules/react/index.js");
2145
2146
var react_fontawesome_1 = __webpack_require__(/*! @fortawesome/react-fontawesome */ "./node_modules/@fortawesome/react-fontawesome/index.es.js");
2146
2147
var free_solid_svg_icons_1 = __webpack_require__(/*! @fortawesome/free-solid-svg-icons */ "./node_modules/@fortawesome/free-solid-svg-icons/index.es.js");
2147
2148
var RemoveConfirmationModal = function (props) {
2149
+ var _a = React.useState(false), forceClosed = _a[0], setForceClosed = _a[1];
2148
2150
var buttonText = props.buttonText, buttonAnchor = props.buttonAnchor, modalTitle = props.modalTitle, modalContent = props.modalContent, handleDelete = props.handleDelete;
2149
- return (React.createElement("section", { className: "modal--show", id: buttonAnchor, tabIndex: -1, role: "dialog", "aria-labelledby": "modal-label", "aria-hidden": "true" },
2151
+ return (React.createElement("section", { className: "modal--show", id: buttonAnchor, tabIndex: -1, role: "dialog", "aria-labelledby": "modal-label", "aria-hidden": "true", style: forceClosed ? { display: 'none' } : {} },
2150
2152
React.createElement("div", { className: "modal-inner" },
2151
2153
React.createElement("header", { id: "modal-label" },
2152
2154
React.createElement("h2", null, modalTitle)),
@@ -2155,10 +2157,10 @@ var RemoveConfirmationModal = function (props) {
2155
2157
React.createElement("a", { className: "button", href: "#!", onClick: handleDelete },
2156
2158
buttonText,
2157
2159
React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faTrash })),
2158
- React.createElement("a", { href: "#!", className: "button" },
2160
+ React.createElement("a", { href: "#!", onClick: function () { return setForceClosed(true); }, className: "button" },
2159
2161
"Close",
2160
2162
React.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faTimes })))),
2161
- React.createElement("a", { href: "#!", className: "modal-close", title: "Close this modal", "data-close": "Close", "data-dismiss": "modal" }, "?")));
2163
+ React.createElement("a", { href: "#!", onClick: function () { return setForceClosed(true); }, className: "modal-close", title: "Close this modal", "data-close": "Close", "data-dismiss": "modal" }, "?")));
2162
2164
};
2163
2165
exports["default"] = RemoveConfirmationModal;
2164
2166
0 commit comments