Skip to content
Snippets Groups Projects
Commit a4529393 authored by Björn Modée's avatar Björn Modée
Browse files

add styling and dashboard grid

parent 0fbc8fa9
No related branches found
No related tags found
1 merge request!59Resolve "Create a dashboard"
...@@ -46,7 +46,9 @@ const useStyles = makeStyles((theme: Theme) => ...@@ -46,7 +46,9 @@ const useStyles = makeStyles((theme: Theme) =>
content: { content: {
flexGrow: 1, flexGrow: 1,
backgroundColor: theme.palette.background.default, backgroundColor: theme.palette.background.default,
paddingLeft: theme.spacing(31), paddingTop: theme.spacing(2),
paddingLeft: theme.spacing(35),
paddingRight: theme.spacing(5),
}, },
}) })
) )
......
import Box from '@material-ui/core/Box' import Grid from '@material-ui/core/Grid'
import Paper from '@material-ui/core/Paper'
import { createStyles, makeStyles, Theme } from '@material-ui/core/styles'
import React from 'react' import React from 'react'
import CurrentUser from './widgets/CurrentUser' import CurrentUser from './widgets/CurrentUser'
// import * from '@material-ui/core'
const useStyles = makeStyles((theme: Theme) =>
createStyles({
root: {
flexGrow: 1,
},
paper: {
padding: theme.spacing(2),
textAlign: 'center',
color: theme.palette.text.secondary,
},
})
)
const Dashboard: React.FC = () => { const Dashboard: React.FC = () => {
const classes = useStyles()
return ( return (
<div className="widget-container"> <div className={classes.root}>
<Box display="flex" flexDirection="row" p={1} m={1} bgcolor="text.disabled"> <div>
<CurrentUser /> <Grid container spacing={3}>
</Box> <Grid item xs={12}>
<Paper className={classes.paper}>Dashboard Header</Paper>
</Grid>
<Grid item xs={6}>
<Paper className={classes.paper}>Widget 1</Paper>
</Grid>
<Grid item xs={6}>
<Paper className={classes.paper}>Widget 2</Paper>
</Grid>
<Grid item xs={3}>
<Paper className={classes.paper}>Widget 3</Paper>
</Grid>
<Grid item xs={3}>
<Paper className={classes.paper}>
Widget 4
<CurrentUser />
</Paper>
</Grid>
<Grid item xs={3}>
<Paper className={classes.paper}>Widget 5</Paper>
</Grid>
<Grid item xs={3}>
<Paper className={classes.paper}>Widget 6</Paper>
</Grid>
</Grid>
</div>
</div> </div>
) )
} }
......
...@@ -6,8 +6,8 @@ import React from 'react' ...@@ -6,8 +6,8 @@ import React from 'react'
const CurrentUser: React.FC = () => { const CurrentUser: React.FC = () => {
return ( return (
<div> <div>
<Box color="text.primary" bgcolor="secondary.main" fontFamily="h3.fontFamily" width="200%" height="200%"> <Box color="text.primary" bgcolor="secondary.main" fontFamily="h3.fontFamily" width="100%" height="100%">
Current User Widget Current user info
</Box> </Box>
</div> </div>
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment