aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/table/TableToolbar.tsx
blob: b14e73c5fa79bf83829badd9bc8eab9321eddacd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
 *
 * SPDX-License-Identifier: EPL-2.0
 */

import Stack from '@mui/material/Stack';
import {
  GridToolbarColumnsButton,
  GridToolbarContainer,
  GridToolbarExport,
  GridToolbarFilterButton,
} from '@mui/x-data-grid';

import type GraphStore from '../graph/GraphStore';

import SymbolSelector from './SymbolSelector';

export default function TableToolbar({
  graph,
}: {
  graph: GraphStore;
}): JSX.Element {
  return (
    <GridToolbarContainer
      sx={{
        display: 'flex',
        flexDirection: 'row',
        flexWrap: 'wrap-reverse',
        justifyContent: 'space-between',
      }}
    >
      <Stack direction="row" flexWrap="wrap">
        <GridToolbarColumnsButton />
        <GridToolbarFilterButton />
        <GridToolbarExport />
      </Stack>
      <SymbolSelector graph={graph} />
    </GridToolbarContainer>
  );
}