From 6514ed55e3f608f468e103cacad547aed276b8bf Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Fri, 9 Oct 2020 03:26:42 +0300
Subject: feat: display version chip on ReviewCard

---
 src/components/ReviewCard/ReviewCard.tsx | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

(limited to 'src/components/ReviewCard/ReviewCard.tsx')

diff --git a/src/components/ReviewCard/ReviewCard.tsx b/src/components/ReviewCard/ReviewCard.tsx
index 2016a5e..ccf051c 100644
--- a/src/components/ReviewCard/ReviewCard.tsx
+++ b/src/components/ReviewCard/ReviewCard.tsx
@@ -4,7 +4,8 @@ import {
   Card,
   CardContent,
   Typography,
-  Divider
+  Divider,
+  Chip
 } from '@material-ui/core/';
 import { Rating } from '@material-ui/lab';
 import { Feedback } from 'which-types';
@@ -17,7 +18,13 @@ interface PropTypes {
 
 const useStyles = makeStyles(theme => ({
   root: {
-    margin: theme.spacing(4, 0, 1, 0)
+    margin: theme.spacing(4, 0, 1, 0),
+    position: 'relative'
+  },
+  versionChip: {
+    position: 'absolute',
+    right: theme.spacing(2),
+    top: theme.spacing(2)
   }
 }));
 
@@ -30,6 +37,12 @@ const ReviewCard: React.FC<PropTypes> = ({ feedback }) => {
         user={feedback.author}
         info={<Rating value={feedback.score} readOnly size="small" />}
       />
+      <Chip
+        size="small"
+        variant="outlined"
+        label={feedback.version}
+        className={classes.versionChip}
+      />
       {feedback.contents && (
         <>
           <Divider />
-- 
cgit v1.2.3

