白石誠 5 лет назад
Родитель
Сommit
f44ff4624d

+ 11 - 3
src/client/js/components/PagePresentationModal.jsx

@@ -5,9 +5,17 @@ import {
 } from 'reactstrap';
 } from 'reactstrap';
 
 
 const PagePresentationModal = (props) => {
 const PagePresentationModal = (props) => {
+
+  function closeModalHandler() {
+    if (props.onClose === null) {
+      return;
+    }
+    props.onClose();
+  }
+
   return (
   return (
-    <Modal isOpen={props.isOpen} toggle={props.onClose} className="grw-presentation-page" unmountOnClose={false}>
-      <ModalBody className="presentation-body">
+    <Modal isOpen={props.isOpen} toggle={closeModalHandler} className="grw-presentation-modal" unmountOnClose={false}>
+      <ModalBody className="modal-body">
         <iframe src={props.href} />
         <iframe src={props.href} />
       </ModalBody>
       </ModalBody>
     </Modal>
     </Modal>
@@ -15,7 +23,7 @@ const PagePresentationModal = (props) => {
 };
 };
 PagePresentationModal.propTypes = {
 PagePresentationModal.propTypes = {
   isOpen: PropTypes.bool.isRequired,
   isOpen: PropTypes.bool.isRequired,
-  onClose: PropTypes.func.isRequired,
+  onClose: PropTypes.func,
   href: PropTypes.string.isRequired,
   href: PropTypes.string.isRequired,
 };
 };
 
 

+ 3 - 5
src/client/styles/scss/_page-presentation.scss

@@ -1,9 +1,7 @@
-.grw-presentation-page {
-  // attached !important for updating from .modal-dialog class style
-  width: 90vw !important;
-  max-width: unset !important;
+.grw-presentation-modal {
+  @include expand-modal-fullscreen(false, false);
 
 
-  .presentation-body {
+  .modal-body {
     height: 90vh;
     height: 90vh;
     background: black;
     background: black;