aboutsummaryrefslogtreecommitdiffstats
path: root/language-web/src/main/js/App.tsx
blob: d25ac4d382094f25ec709fce86bacecf0657957f (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import AppBar from '@mui/material/AppBar';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import IconButton from '@mui/material/IconButton';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import MenuIcon from '@mui/icons-material/Menu';
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
import React from 'react';

import { EditorArea } from './editor/EditorArea';
import { EditorButtons } from './editor/EditorButtons';

export const App = (): JSX.Element => (
  <Box
    display="flex"
    flexDirection="column"
    sx={{ height: '100vh' }}
  >
    <AppBar
      position="static"
      color="inherit"
    >
      <Toolbar>
        <IconButton
          edge="start"
          sx={{ mr: 2 }}
          color="inherit"
          aria-label="menu"
        >
          <MenuIcon />
        </IconButton>
        <Typography
          variant="h6"
          component="h1"
          flexGrow={1}
        >
          Refinery
        </Typography>
      </Toolbar>
    </AppBar>
    <Box
      display="flex"
      justifyContent="space-between"
      alignItems="center"
      p={1}
    >
      <EditorButtons />
      <Button
        variant="outlined"
        color="primary"
        startIcon={<PlayArrowIcon />}
      >
        Generate
      </Button>
    </Box>
    <Box
      flexGrow={1}
      flexShrink={1}
      sx={{ overflow: 'auto' }}
    >
      <EditorArea />
    </Box>
  </Box>
);