From 9b78fb4bb6d036620bf5bcae55c0e927444973e2 Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Fri, 29 Jan 2021 12:35:26 +0100 Subject: [PATCH] Review comments --- .../core/src/layout/ItemCard/ItemCard.stories.tsx | 2 +- packages/core/src/layout/ItemCard/ItemCard.tsx | 14 ++++++++++---- plugins/explore/README.md | 2 +- .../ToolExplorerContent/ToolExplorerContent.tsx | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/core/src/layout/ItemCard/ItemCard.stories.tsx b/packages/core/src/layout/ItemCard/ItemCard.stories.tsx index 6e534f6f5c..b53fa9eb7a 100644 --- a/packages/core/src/layout/ItemCard/ItemCard.stories.tsx +++ b/packages/core/src/layout/ItemCard/ItemCard.stories.tsx @@ -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" /> diff --git a/packages/core/src/layout/ItemCard/ItemCard.tsx b/packages/core/src/layout/ItemCard/ItemCard.tsx index 3b0727b64f..4242cd6381 100644 --- a/packages/core/src/layout/ItemCard/ItemCard.tsx +++ b/packages/core/src/layout/ItemCard/ItemCard.tsx @@ -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 = ({ 0 ? classes.withTags : '' - }`} + className={clsx( + classes.description, + tags && tags.length > 0 && classes.withTags, + )} > {description} @@ -86,7 +88,11 @@ export const ItemCard = ({ {label} )} - {href && {label}} + {href && ( + + )} diff --git a/plugins/explore/README.md b/plugins/explore/README.md index 2b17efc605..00bad28549 100644 --- a/plugins/explore/README.md +++ b/plugins/explore/README.md @@ -8,7 +8,7 @@ This plugin helps to visualize the domains and tools in your ecosystem. To install the plugin, include the following import your `plugins.ts`: ```typescript -export { plugin as Ecosystem } from '@backstage/plugin-explore'; +export { explorePlugin } from '@backstage/plugin-explore'; ``` Add a link to the sidebar in `Root.tsx`: diff --git a/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx b/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx index 5e45102e65..8b8b3f0a61 100644 --- a/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx +++ b/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx @@ -21,9 +21,9 @@ import { SupportButton, useApi, } from '@backstage/core'; +import { exploreToolsConfigRef } from '@backstage/plugin-explore-react'; import React from 'react'; import { useAsync } from 'react-use'; -import { exploreToolsConfigRef } from '../../../../explore-react/src'; import { ToolCardGrid } from '../ToolCard'; export const ToolExplorerContent = () => {