diff options
author | eug-vs <eug-vs@keemail.me> | 2020-07-05 11:14:15 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-07-05 11:14:15 +0300 |
commit | ad049a20fa2d92d9d0cee0af25be799eadf02b46 (patch) | |
tree | a78b88659436565a2418723d836e1917e7b0a9b3 /src/components | |
parent | a56ed602a4149a3e19ac58c84c51e0eb108358c2 (diff) | |
download | which-ui-ad049a20fa2d92d9d0cee0af25be799eadf02b46.tar.gz |
feat: add reviews under logo
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/ReviewCard/ReviewCard.tsx | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/components/ReviewCard/ReviewCard.tsx b/src/components/ReviewCard/ReviewCard.tsx new file mode 100644 index 0000000..9c3dd20 --- /dev/null +++ b/src/components/ReviewCard/ReviewCard.tsx @@ -0,0 +1,43 @@ +import React from 'react'; +import { makeStyles } from '@material-ui/core/styles'; +import { + Card, + CardContent, + Typography, + Divider +} from '@material-ui/core/'; +import { Rating } from '@material-ui/lab' +import { Feedback } from 'which-types'; + +import UserStrip from '../UserStrip/UserStrip'; + +interface PropTypes { + feedback: Feedback; +} + +const useStyles = makeStyles(theme => ({ + root: { + margin: theme.spacing(4, 0, 1, 0) + } +})); + +const ReviewCard: React.FC<PropTypes> = ({ feedback }) => { + const classes = useStyles(); + + return ( + <Card className={classes.root} elevation={2}> + <UserStrip + user={feedback.author} + info={<Rating value={feedback.score} readOnly size="small" />} + /> + <Divider /> + <CardContent> + <Typography> + {feedback.contents} + </Typography> + </CardContent> + </Card> + ); +}; + +export default ReviewCard; |