aboutsummaryrefslogtreecommitdiff
path: root/src/components/ReviewCard
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2020-07-05 12:38:59 +0300
committerGitHub <noreply@github.com>2020-07-05 12:38:59 +0300
commite08140bf69c10b0bd313da4bce0abdabf29ef709 (patch)
tree0c602e06fa729c3895d4aadc9b134ad3fe3cc701 /src/components/ReviewCard
parenta56ed602a4149a3e19ac58c84c51e0eb108358c2 (diff)
parent7ba3047602d8850bb2f80d52448e08cc47290d23 (diff)
downloadwhich-ui-e08140bf69c10b0bd313da4bce0abdabf29ef709.tar.gz
Merge pull request #62 from which-ecosystem/feedback
Feedback feature & instagram links
Diffstat (limited to 'src/components/ReviewCard')
-rw-r--r--src/components/ReviewCard/ReviewCard.tsx43
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..97581fc
--- /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;