WNomunomu 2 лет назад
Родитель
Сommit
137bd10821

+ 31 - 0
apps/app/src/components/ModalForParentPageSelection.tsx

@@ -0,0 +1,31 @@
+import React, { useState } from 'react';
+
+import {
+  Modal, ModalHeader, ModalBody, ModalFooter, Button,
+} from 'reactstrap';
+
+export const ModalForParentPageSelection = () => {
+  const [modal, setModal] = useState(false);
+
+  const toggle = () => setModal(!modal);
+
+  return (
+    <>
+      <Button color="primary" onClick={toggle}>起動!</Button>
+      <Modal isOpen={modal} toggle={toggle} centered="true">
+        <ModalHeader toggle={toggle}>Modal Title</ModalHeader>
+        <ModalBody>
+          明日には明日の風が吹く
+        </ModalBody>
+        <ModalFooter>
+          <Button color="primary" onClick={toggle}>
+            Do Something
+          </Button>{' '}
+          <Button color="secondary" onClick={toggle}>
+            Cancel
+          </Button>
+        </ModalFooter>
+      </Modal>
+    </>
+  );
+};

+ 4 - 0
apps/app/src/components/PageEditor/Editor.tsx

@@ -17,6 +17,7 @@ import { useEditorSettings } from '~/stores/editor';
 import { useIsMobile } from '~/stores/ui';
 
 import { IEditorMethods } from '../../interfaces/editor-methods';
+import { ModalForParentPageSelection } from '../ModalForParentPageSelection';
 
 import AbstractEditor from './AbstractEditor';
 import { Cheatsheet } from './Cheatsheet';
@@ -24,6 +25,7 @@ import CodeMirrorEditor from './CodeMirrorEditor';
 import pasteHelper from './PasteHelper';
 import TextAreaEditor from './TextAreaEditor';
 
+
 import styles from './Editor.module.scss';
 
 export type EditorPropsType = {
@@ -335,6 +337,8 @@ const Editor: ForwardRefRenderFunction<IEditorMethods, EditorPropsType> = (props
           }}
         </Dropzone>
 
+        <ModalForParentPageSelection></ModalForParentPageSelection>
+
         { isUploadable
           && (
             <button