Playground.tsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { useRef } from 'react';
  2. import { CodeMirrorEditorContainer } from '..';
  3. import { useCodeMirrorEditorMain } from '../../stores';
  4. import { PlaygroundController } from './PlaygroundController';
  5. export const Playground = (): JSX.Element => {
  6. const containerRef = useRef(null);
  7. useCodeMirrorEditorMain({
  8. container: containerRef.current,
  9. });
  10. return (
  11. <>
  12. <div className="flex-expand-vert justify-content-center align-items-center bg-dark" style={{ minHeight: '83px' }}>
  13. <div className="text-white">GrowiSubNavigation</div>
  14. </div>
  15. <div className="flex-expand-horiz">
  16. <div className="flex-expand-vert">
  17. <CodeMirrorEditorContainer ref={containerRef} />
  18. </div>
  19. <div className="flex-expand-vert d-none d-lg-flex bg-light border-start border-dark-subtle p-3">
  20. <PlaygroundController />
  21. </div>
  22. </div>
  23. <div className="flex-expand-vert justify-content-center align-items-center bg-dark" style={{ minHeight: '50px' }}>
  24. <div className="text-white">EditorNavbarBottom</div>
  25. </div>
  26. </>
  27. );
  28. };