Review comments

This commit is contained in:
Oliver Sand
2021-01-29 12:35:26 +01:00
parent 1f1ad490cd
commit 9b78fb4bb6
4 changed files with 13 additions and 7 deletions
@@ -82,7 +82,7 @@ export const Link = () => (
title="Backstage"
description="This is the description of an Item Card with link"
label="Read More"
href="https://www.backstage.io"
href="https://backstage.io"
/>
</Grid>
<Grid item xs={12} md={3}>
+10 -4
View File
@@ -14,6 +14,7 @@
* limitations under the License.
*/
import { Button, Card, Chip, makeStyles, Typography } from '@material-ui/core';
import clsx from 'clsx';
import React from 'react';
import { Link } from '../../components';
@@ -74,9 +75,10 @@ export const ItemCard = ({
<Typography
variant="body2"
paragraph
className={`${classes.description} ${
tags && tags.length > 0 ? classes.withTags : ''
}`}
className={clsx(
classes.description,
tags && tags.length > 0 && classes.withTags,
)}
>
{description}
</Typography>
@@ -86,7 +88,11 @@ export const ItemCard = ({
{label}
</Button>
)}
{href && <Link to={href}>{label}</Link>}
{href && (
<Button component={Link} to={href} color="primary">
{label}
</Button>
)}
</div>
</div>
</Card>