diff options
author | Eugene <eug-vs@keemail.me> | 2020-01-05 12:12:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-05 12:12:02 +0000 |
commit | e652fc1d4e171791c72de100ced0862a8b37d3d0 (patch) | |
tree | 4eb56d29f623e78f6b9d518825987de900d2f341 /src/components/Scoreboard/Solution.js | |
parent | 048f277ef7831b8f1a02c5e6590fb8087862b7fc (diff) | |
parent | 5919ca26792796c99bfac316a9dfca0b9257fe76 (diff) | |
download | chrono-cube-ui-e652fc1d4e171791c72de100ced0862a8b37d3d0.tar.gz |
Merge pull request #23 from Eug-VS/solution-card
Isolate and improve SolutionCard
Diffstat (limited to 'src/components/Scoreboard/Solution.js')
-rw-r--r-- | src/components/Scoreboard/Solution.js | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/src/components/Scoreboard/Solution.js b/src/components/Scoreboard/Solution.js deleted file mode 100644 index 1d54b04..0000000 --- a/src/components/Scoreboard/Solution.js +++ /dev/null @@ -1,71 +0,0 @@ -import React from 'react'; - -import { - Typography, - Card, - Container, - Box, - ExpansionPanelSummary, - ExpansionPanel, - ExpansionPanelDetails, -} from "@material-ui/core"; - -import { makeStyles } from "@material-ui/core/styles"; -import TimerIcon from '@material-ui/icons/Timer'; -import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; - - -const useStyles = makeStyles(theme => ({ - item: { - margin: theme.spacing(3), - width: theme.spacing(60), - - '& .MuiBox-root': { - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - }, - - '& .MuiTypography-h2': { - color: theme.palette.secondary.main, - margin: theme.spacing(2), - }, - }, - -})); - -const Solution = ({ solution }) => { - const classes = useStyles(); - - const author = solution.author? solution.author : 'anonymous'; - return ( - <Card elevation={4} className={classes.item}> - <Container maxWidth="xs"> - <Box> - <TimerIcon/> - <Typography variant="h2"> - { solution.result } - </Typography> - </Box> - </Container> - - <ExpansionPanel> - <ExpansionPanelSummary expandIcon={<ExpandMoreIcon style={{color: 'white'}}/>}> - <Typography variant="h6"> - By {author} - </Typography> - </ExpansionPanelSummary> - <ExpansionPanelDetails> - <Typography> - Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget. - Lorem ipsum dolor sit amet, consectetur adipiscing elit. - Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget. - </Typography> - </ExpansionPanelDetails> - </ExpansionPanel> - </Card> - ) -}; - -export default Solution; |