diff options
author | 2023-08-30 22:14:50 +0200 | |
---|---|---|
committer | 2023-08-31 00:57:52 +0200 | |
commit | d4504285d15aeb0cb1560a5f522ac1edc02b7d4c (patch) | |
tree | f279dd795fc715c31ebb3b46a45e8ab12ac6d8e2 /subprojects/frontend/src/table/TableToolbar.tsx | |
parent | feat(frontend): window pane switcher (diff) | |
download | refinery-d4504285d15aeb0cb1560a5f522ac1edc02b7d4c.tar.gz refinery-d4504285d15aeb0cb1560a5f522ac1edc02b7d4c.tar.zst refinery-d4504285d15aeb0cb1560a5f522ac1edc02b7d4c.zip |
feat(frontend): implement grid view
Diffstat (limited to 'subprojects/frontend/src/table/TableToolbar.tsx')
-rw-r--r-- | subprojects/frontend/src/table/TableToolbar.tsx | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/subprojects/frontend/src/table/TableToolbar.tsx b/subprojects/frontend/src/table/TableToolbar.tsx new file mode 100644 index 00000000..7645deae --- /dev/null +++ b/subprojects/frontend/src/table/TableToolbar.tsx | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | |||
7 | import Stack from '@mui/material/Stack'; | ||
8 | import { | ||
9 | GridToolbarColumnsButton, | ||
10 | GridToolbarContainer, | ||
11 | GridToolbarDensitySelector, | ||
12 | GridToolbarExport, | ||
13 | GridToolbarFilterButton, | ||
14 | } from '@mui/x-data-grid'; | ||
15 | |||
16 | import type GraphStore from '../graph/GraphStore'; | ||
17 | |||
18 | import SymbolSelector from './SymbolSelector'; | ||
19 | |||
20 | export default function TableToolbar({ | ||
21 | graph, | ||
22 | }: { | ||
23 | graph: GraphStore; | ||
24 | }): JSX.Element { | ||
25 | return ( | ||
26 | <GridToolbarContainer | ||
27 | sx={{ | ||
28 | display: 'flex', | ||
29 | flexDirection: 'row', | ||
30 | flexWrap: 'wrap-reverse', | ||
31 | justifyContent: 'space-between', | ||
32 | }} | ||
33 | > | ||
34 | <Stack direction="row" flexWrap="wrap"> | ||
35 | <GridToolbarColumnsButton /> | ||
36 | <GridToolbarFilterButton /> | ||
37 | <GridToolbarDensitySelector /> | ||
38 | <GridToolbarExport /> | ||
39 | </Stack> | ||
40 | <SymbolSelector graph={graph} /> | ||
41 | </GridToolbarContainer> | ||
42 | ); | ||
43 | } | ||