aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/WorkArea.tsx
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2023-08-30 19:07:05 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2023-08-30 19:07:05 +0200
commite41e0391ba843b85a5b2890db95121fa39426a05 (patch)
tree4927c919cf3077ba9abb2cf31155de4d227b3119 /subprojects/frontend/src/WorkArea.tsx
parentrefactor(frontend): filter dialog formatting (diff)
downloadrefinery-e41e0391ba843b85a5b2890db95121fa39426a05.tar.gz
refinery-e41e0391ba843b85a5b2890db95121fa39426a05.tar.zst
refinery-e41e0391ba843b85a5b2890db95121fa39426a05.zip
feat(frontend): window pane switcher
Diffstat (limited to 'subprojects/frontend/src/WorkArea.tsx')
-rw-r--r--subprojects/frontend/src/WorkArea.tsx33
1 files changed, 33 insertions, 0 deletions
diff --git a/subprojects/frontend/src/WorkArea.tsx b/subprojects/frontend/src/WorkArea.tsx
new file mode 100644
index 00000000..adb29a50
--- /dev/null
+++ b/subprojects/frontend/src/WorkArea.tsx
@@ -0,0 +1,33 @@
1/*
2 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6
7import { observer } from 'mobx-react-lite';
8
9import DirectionalSplitPane from './DirectionalSplitPane';
10import { useRootStore } from './RootStoreProvider';
11import EditorPane from './editor/EditorPane';
12import GraphPane from './graph/GraphPane';
13import TablePane from './table/TablePane';
14
15export default observer(function WorkArea(): JSX.Element {
16 const { themeStore } = useRootStore();
17
18 return (
19 <DirectionalSplitPane
20 primary={<EditorPane />}
21 secondary={
22 <DirectionalSplitPane
23 primary={<GraphPane />}
24 secondary={<TablePane />}
25 primaryOnly={!themeStore.showTable}
26 secondaryOnly={!themeStore.showGraph}
27 />
28 }
29 primaryOnly={!themeStore.showGraph && !themeStore.showTable}
30 secondaryOnly={!themeStore.showCode}
31 />
32 );
33});