aboutsummaryrefslogtreecommitdiffstats
path: root/language-web/src/main/js/App.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'language-web/src/main/js/App.jsx')
-rw-r--r--language-web/src/main/js/App.jsx61
1 files changed, 40 insertions, 21 deletions
diff --git a/language-web/src/main/js/App.jsx b/language-web/src/main/js/App.jsx
index 61ded943..a0920823 100644
--- a/language-web/src/main/js/App.jsx
+++ b/language-web/src/main/js/App.jsx
@@ -2,7 +2,7 @@ import React from 'react';
2import { makeStyles } from '@material-ui/core/styles'; 2import { makeStyles } from '@material-ui/core/styles';
3import AppBar from '@material-ui/core/AppBar'; 3import AppBar from '@material-ui/core/AppBar';
4import Box from '@material-ui/core/Box'; 4import Box from '@material-ui/core/Box';
5import Fab from '@material-ui/core/Fab'; 5import Button from '@material-ui/core/Button';
6import IconButton from '@material-ui/core/IconButton'; 6import IconButton from '@material-ui/core/IconButton';
7import Toolbar from '@material-ui/core/Toolbar'; 7import Toolbar from '@material-ui/core/Toolbar';
8import Typography from '@material-ui/core/Typography'; 8import Typography from '@material-ui/core/Typography';
@@ -13,30 +13,32 @@ import Editor from './editor/Editor';
13import EditorButtons from './editor/EditorButtons'; 13import EditorButtons from './editor/EditorButtons';
14 14
15const useStyles = makeStyles(theme => ({ 15const useStyles = makeStyles(theme => ({
16 container: {
17 maxHeight: '100vh',
18 },
16 menuButton: { 19 menuButton: {
17 marginRight: theme.spacing(2), 20 marginRight: theme.spacing(2),
18 }, 21 },
19 title: { 22 title: {
20 flexGrow: 1, 23 flexGrow: 1,
21 }, 24 },
22 fab: { 25 editorBox: {
23 position: 'fixed', 26 overflow: 'auto',
24 right: theme.spacing(3),
25 bottom: theme.spacing(3),
26 zIndex: 1000,
27 }, 27 },
28 extendedIcon: {
29 marginRight: theme.spacing(1),
30 }
31})); 28}));
32 29
33export default () => { 30export default () => {
34 const classes = useStyles(); 31 const classes = useStyles();
35 32
36 return ( 33 return (
37 <> 34 <Box
35 display='flex'
36 flexDirection='column'
37 className={classes.container}
38 >
38 <AppBar 39 <AppBar
39 position='static' 40 position='static'
41 color='inherit'
40 > 42 >
41 <Toolbar> 43 <Toolbar>
42 <IconButton 44 <IconButton
@@ -56,18 +58,35 @@ export default () => {
56 </Typography> 58 </Typography>
57 </Toolbar> 59 </Toolbar>
58 </AppBar> 60 </AppBar>
59 <Box> 61 <Box
60 <EditorButtons/> 62 display='flex'
63 justifyContent='space-between'
64 alignItems='center'
65 p={1}
66 >
67 <Box
68 display='flex'
69 alignItems='center'
70 >
71 <EditorButtons/>
72 </Box>
73 <Box>
74 <Button
75 variant='outlined'
76 color='primary'
77 startIcon={<PlayArrowIcon/>}
78 >
79 Generate
80 </Button>
81 </Box>
61 </Box> 82 </Box>
62 <Editor/> 83 <Box
63 <Fab 84 flexGrow={1}
64 variant='extended' 85 flexShrink={1}
65 color='secondary' 86 className={classes.editorBox}
66 className={classes.fab}
67 > 87 >
68 <PlayArrowIcon className={classes.extendedIcon}/> 88 <Editor/>
69 Generate 89 </Box>
70 </Fab> 90 </Box>
71 </>
72 ); 91 );
73}; 92};