summaryrefslogtreecommitdiffstats
path: root/src/renderer/editor/editor.tsx
blob: 2c57afc0c8434bf3db2516ce46c708a29c599831 (plain)
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
import * as React from 'react';

import 'typeface-roboto';

import { createMuiTheme, makeStyles, Theme, ThemeProvider } from '@material-ui/core/styles';

import CssBaseline from '@material-ui/core/CssBaseline';
import Drawer from '@material-ui/core/Drawer';

import { Library } from './library';

const drawerWidth = 240;

const useStyles = makeStyles((theme: Theme) => ({
	root: {
		display: 'flex',
	},
	drawer: {
		width: drawerWidth,
		flexShrink: 0,
	},
	drawerPaper: {
		width: drawerWidth,
	},
	content: {
		flexGrow: 1,
		padding: theme.spacing(3),
	},
}));

function EditorLayout(): JSX.Element {
	const classes = useStyles();

	return (
		<div className={classes.root}>
			<CssBaseline />
			<Drawer
				className={classes.drawer}
				variant='permanent'
				classes={{
					paper: classes.drawerPaper,
				}}
				anchor='left'
			></Drawer>
			<main className={classes.content}>
				<Library />
			</main>
		</div>
	);
}

const theme = createMuiTheme({
	palette: {
		type: 'dark',
	},
});

export function Editor(): JSX.Element {
	return (
		<ThemeProvider theme={theme}>
			<EditorLayout />
		</ThemeProvider>
	);
}