aboutsummaryrefslogtreecommitdiff
path: root/src/components/ReviewCard/ReviewCard.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-10-09 03:26:42 +0300
committereug-vs <eug-vs@keemail.me>2020-10-09 03:26:42 +0300
commit6514ed55e3f608f468e103cacad547aed276b8bf (patch)
tree96b21497f893e52c7a3576fbd0c16fa97d74ee6b /src/components/ReviewCard/ReviewCard.tsx
parentfbb0a7fd921c4f2675147f0f8bc08a221b736a53 (diff)
downloadwhich-ui-6514ed55e3f608f468e103cacad547aed276b8bf.tar.gz
feat: display version chip on ReviewCard
Diffstat (limited to 'src/components/ReviewCard/ReviewCard.tsx')
-rw-r--r--src/components/ReviewCard/ReviewCard.tsx17
1 files changed, 15 insertions, 2 deletions
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 />