diff options
author | Eug-VS <eug-vs@keemail.me> | 2020-01-05 02:21:02 +0300 |
---|---|---|
committer | Eug-VS <eug-vs@keemail.me> | 2020-01-05 02:21:02 +0300 |
commit | 321674f2710910f87893b4d0e65e67b77d1ebaa4 (patch) | |
tree | 532824f886fed093769859f40813030b420a68e0 /src | |
parent | cc047c9222be0b3d24b43f86f02d30b4bb0a58f2 (diff) | |
download | chrono-cube-ui-321674f2710910f87893b4d0e65e67b77d1ebaa4.tar.gz |
Use Grid instead of CSS to center time
Diffstat (limited to 'src')
-rw-r--r-- | src/components/SolutionCard/SolutionCard.js | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/components/SolutionCard/SolutionCard.js b/src/components/SolutionCard/SolutionCard.js index f8133db..5f3e5b4 100644 --- a/src/components/SolutionCard/SolutionCard.js +++ b/src/components/SolutionCard/SolutionCard.js @@ -7,6 +7,7 @@ import { CardContent, IconButton, Avatar, + Grid, } from "@material-ui/core"; import { makeStyles } from "@material-ui/core/styles"; @@ -18,18 +19,11 @@ const useStyles = makeStyles(theme => ({ root: { padding: theme.spacing(1), - '& .MuiCardContent-root': { - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - }, - '& .MuiTypography-h3': { color: theme.palette.secondary.main, margin: theme.spacing(2), }, }, - })); const SolutionCard = ({ solution }) => { @@ -54,12 +48,17 @@ const SolutionCard = ({ solution }) => { )} /> <CardContent> - <TimerIcon/> - <Typography variant="h3"> - { solution.result } - </Typography> + <Grid container direction="row" justify="center" alignItems="center"> + <Grid item> + <TimerIcon/> + </Grid> + <Grid item> + <Typography variant="h3"> + { solution.result } + </Typography> + </Grid> + </Grid> </CardContent> - </Card> ) }; |