diff options
author | Kristóf Marussy <kristof@marussy.com> | 2023-08-30 19:07:05 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2023-08-30 19:07:05 +0200 |
commit | e41e0391ba843b85a5b2890db95121fa39426a05 (patch) | |
tree | 4927c919cf3077ba9abb2cf31155de4d227b3119 /subprojects/frontend/src/WorkArea.tsx | |
parent | refactor(frontend): filter dialog formatting (diff) | |
download | refinery-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.tsx | 33 |
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 | |||
7 | import { observer } from 'mobx-react-lite'; | ||
8 | |||
9 | import DirectionalSplitPane from './DirectionalSplitPane'; | ||
10 | import { useRootStore } from './RootStoreProvider'; | ||
11 | import EditorPane from './editor/EditorPane'; | ||
12 | import GraphPane from './graph/GraphPane'; | ||
13 | import TablePane from './table/TablePane'; | ||
14 | |||
15 | export 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 | }); | ||