Yuki Takei 2 лет назад
Родитель
Сommit
dcafcf3c56

+ 1 - 1
packages/editor/index.html

@@ -7,7 +7,7 @@
     <title>Vite + React + TS</title>
   </head>
   <body>
-    <div id="root"></div>
+    <div id="root" class="d-flex flex-column vw-100 vh-100"></div>
     <script type="module" src="/src/main.tsx"></script>
   </body>
 </html>

+ 16 - 1
packages/editor/src/components/playground/Playground.tsx

@@ -18,6 +18,21 @@ export const Playground = (): JSX.Element => {
   }, [setContainer]);
 
   return (
-    <CodeMirrorEditorContainer ref={containerRef} />
+    <>
+      <div className="flex-grow-1 d-flex flex-column justify-content-center align-items-center bg-dark" style={{ minHeight: '83px' }}>
+        <div className="text-white">GrowiSubnavigation</div>
+      </div>
+      <div className="flex-grow-1 d-flex overflow-auto">
+        <div className="flex-grow-1 d-flex flex-column">
+          <CodeMirrorEditorContainer ref={containerRef} />
+        </div>
+        <div className="flex-grow-1 d-flex flex-column justify-content-center align-items-center bg-light border-left border-dark-subtle">
+          <p>PREVIEW</p>
+        </div>
+      </div>
+      <div className="flex-grow-1 d-flex flex-column justify-content-center align-items-center bg-dark" style={{ minHeight: '50px' }}>
+        <div className="text-white">EditorNavbarBottom</div>
+      </div>
+    </>
   );
 };

+ 1 - 8
packages/editor/src/main.scss

@@ -1,8 +1 @@
-body {
-  min-height: 100vh;
-  margin: 0;
-}
-
-#root {
-  min-height: 100vh;
-}
+@import 'bootstrap';

+ 1 - 0
packages/editor/vite.config.ts

@@ -9,6 +9,7 @@ import dts from 'vite-plugin-dts';
 
 const excludeFiles = [
   '**/@types/*',
+  '**/components/playground/*',
   '**/main.tsx',
   '**/vite-env.d.ts',
 ];