12c01119619eb1113b92006fb0ccc736.json 4.71 KB
Newer Older
1
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\messageModal\\\\MessageModal.jsx\";\nimport React, { useState, useEffect, useRef } from 'react';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst MessageModal = ({\n  removeModal,\n  headerMessage,\n  bodyMessage\n}) => {\n  const stopProp = e => {\n    e.stopPropagation();\n  }; // useEffect(() => {\n  //   const pageClickEvent = (e) => {\n  //     if (messageModalRef.current !== null && !messageModalRef.current.contains(e.target)) {\n  //       toggleModalVisible()\n  //     }\n  //   };\n  //   // If the item is active (ie open) then listen for clicks\n  //   if (modalVisibilityState) {\n  //     window.addEventListener('click', pageClickEvent);\n  //   }\n  //   return () => {\n  //     window.removeEventListener('click', pageClickEvent);\n  //   }\n  // }, [modalVisibilityState]);\n\n\n  return /*#__PURE__*/_jsxDEV(\"div\", {\n    className: \"modal background\",\n    onClick: e => removeModal(),\n    children: /*#__PURE__*/_jsxDEV(\"div\", {\n      className: \"modal-content\",\n      children: /*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"submitOkModal\",\n        children: [/*#__PURE__*/_jsxDEV(\"h2\", {\n          children: headerMessage\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 30,\n          columnNumber: 11\n        }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n          children: bodyMessage\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 31,\n          columnNumber: 11\n        }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n          className: \"formSubmitButton\",\n          onClick: e => removeModal(),\n          children: \"Ok\"\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 34,\n          columnNumber: 11\n        }, this)]\n      }, void 0, true, {\n        fileName: _jsxFileName,\n        lineNumber: 29,\n        columnNumber: 9\n      }, this)\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 28,\n      columnNumber: 7\n    }, this)\n  }, void 0, false, {\n    fileName: _jsxFileName,\n    lineNumber: 27,\n    columnNumber: 5\n  }, this);\n};\n\n_c = MessageModal;\nexport default MessageModal;\n\nvar _c;\n\n$RefreshReg$(_c, \"MessageModal\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/messageModal/MessageModal.jsx"],"names":["React","useState","useEffect","useRef","MessageModal","removeModal","headerMessage","bodyMessage","stopProp","e","stopPropagation"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,SAA1B,EAAqCC,MAArC,QAAmD,OAAnD;;;AAEA,MAAMC,YAAY,GAAG,CAAC;AAAEC,EAAAA,WAAF;AAAeC,EAAAA,aAAf;AAA8BC,EAAAA;AAA9B,CAAD,KAAiD;AACpE,QAAMC,QAAQ,GAAGC,CAAC,IAAI;AACpBA,IAAAA,CAAC,CAACC,eAAF;AACD,GAFD,CADoE,CAKpE;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;;;AAEA,sBACE;AAAK,IAAA,SAAS,EAAC,kBAAf;AAAkC,IAAA,OAAO,EAAED,CAAC,IAAIJ,WAAW,EAA3D;AAAA,2BACE;AAAK,MAAA,SAAS,EAAC,eAAf;AAAA,6BACE;AAAK,QAAA,SAAS,EAAC,eAAf;AAAA,gCACE;AAAA,oBAAKC;AAAL;AAAA;AAAA;AAAA;AAAA,gBADF,eAEE;AAAA,oBACGC;AADH;AAAA;AAAA;AAAA;AAAA,gBAFF,eAKE;AAAQ,UAAA,SAAS,EAAC,kBAAlB;AAAqC,UAAA,OAAO,EAAEE,CAAC,IAAIJ,WAAW,EAA9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBALF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAeD,CAtCD;;KAAMD,Y;AAwCN,eAAeA,YAAf","sourcesContent":["import React, { useState, useEffect, useRef } from 'react'\r\n\r\nconst MessageModal = ({ removeModal, headerMessage, bodyMessage }) => {\r\n  const stopProp = e => {\r\n    e.stopPropagation()\r\n  }\r\n\r\n  // useEffect(() => {\r\n  //   const pageClickEvent = (e) => {\r\n  //     if (messageModalRef.current !== null && !messageModalRef.current.contains(e.target)) {\r\n  //       toggleModalVisible()\r\n  //     }\r\n  //   };\r\n\r\n  //   // If the item is active (ie open) then listen for clicks\r\n  //   if (modalVisibilityState) {\r\n  //     window.addEventListener('click', pageClickEvent);\r\n  //   }\r\n\r\n  //   return () => {\r\n  //     window.removeEventListener('click', pageClickEvent);\r\n  //   }\r\n\r\n  // }, [modalVisibilityState]);\r\n\r\n  return (\r\n    <div className=\"modal background\" onClick={e => removeModal()}>\r\n      <div className=\"modal-content\">\r\n        <div className=\"submitOkModal\">\r\n          <h2>{headerMessage}</h2>\r\n          <label>\r\n            {bodyMessage}\r\n          </label>\r\n          <button className=\"formSubmitButton\" onClick={e => removeModal()}>\r\n            Ok\r\n          </button>\r\n        </div>\r\n      </div>\r\n    </div >\r\n  )\r\n}\r\n\r\nexport default MessageModal\r\n"]},"metadata":{},"sourceType":"module"}