aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/editor/EditorPane.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/frontend/src/editor/EditorPane.tsx')
-rw-r--r--subprojects/frontend/src/editor/EditorPane.tsx38
1 files changed, 38 insertions, 0 deletions
diff --git a/subprojects/frontend/src/editor/EditorPane.tsx b/subprojects/frontend/src/editor/EditorPane.tsx
new file mode 100644
index 00000000..935a84e8
--- /dev/null
+++ b/subprojects/frontend/src/editor/EditorPane.tsx
@@ -0,0 +1,38 @@
1import Box from '@mui/material/Box';
2import Stack from '@mui/material/Stack';
3import Toolbar from '@mui/material/Toolbar';
4import { observer } from 'mobx-react-lite';
5import React from 'react';
6
7import Loading from '../Loading';
8import { useRootStore } from '../RootStore';
9
10import EditorArea from './EditorArea';
11import EditorButtons from './EditorButtons';
12import GenerateButton from './GenerateButton';
13import SearchPanelPortal from './SearchPanelPortal';
14
15function EditorPane(): JSX.Element {
16 const { editorStore } = useRootStore();
17
18 return (
19 <Stack direction="column" flexGrow={1} flexShrink={1} overflow="auto">
20 <Toolbar variant="dense">
21 <EditorButtons editorStore={editorStore} />
22 <GenerateButton editorStore={editorStore} />
23 </Toolbar>
24 <Box flexGrow={1} flexShrink={1} overflow="auto">
25 {editorStore === undefined ? (
26 <Loading />
27 ) : (
28 <>
29 <SearchPanelPortal editorStore={editorStore} />
30 <EditorArea editorStore={editorStore} />
31 </>
32 )}
33 </Box>
34 </Stack>
35 );
36}
37
38export default observer(EditorPane);