diff --git a/plugins/tech-radar/src/components/RadarDescription/RadarDescription.test.tsx b/plugins/tech-radar/src/components/RadarDescription/RadarDescription.test.tsx index 54b8ef0892..b19794042e 100644 --- a/plugins/tech-radar/src/components/RadarDescription/RadarDescription.test.tsx +++ b/plugins/tech-radar/src/components/RadarDescription/RadarDescription.test.tsx @@ -19,7 +19,7 @@ import { render, screen } from '@testing-library/react'; import { ThemeProvider } from '@material-ui/core'; import { lightTheme } from '@backstage/theme'; -import RadarDescription, { Props } from './RadarDescription'; +import { Props, RadarDescription } from './RadarDescription'; const minProps: Props = { open: true, diff --git a/plugins/tech-radar/src/components/RadarDescription/RadarDescription.tsx b/plugins/tech-radar/src/components/RadarDescription/RadarDescription.tsx index 24e31dd34f..20c489f630 100644 --- a/plugins/tech-radar/src/components/RadarDescription/RadarDescription.tsx +++ b/plugins/tech-radar/src/components/RadarDescription/RadarDescription.tsx @@ -29,7 +29,6 @@ export type Props = { }; const RadarDescription = (props: Props): JSX.Element => { - // const classes = useStyles(props); const { open, onClose, title, description, url } = props; const handleClick = () => { @@ -41,7 +40,9 @@ const RadarDescription = (props: Props): JSX.Element => { return ( - {title} + + {title} + {description} {url && ( @@ -49,6 +50,7 @@ const RadarDescription = (props: Props): JSX.Element => { onClick={handleClick} color="primary" startIcon={} + href={url} > LEARN MORE @@ -58,4 +60,4 @@ const RadarDescription = (props: Props): JSX.Element => { ); }; -export default RadarDescription; +export { RadarDescription }; diff --git a/plugins/tech-radar/src/components/RadarDescription/index.ts b/plugins/tech-radar/src/components/RadarDescription/index.ts index 908e97701e..748898cf0b 100644 --- a/plugins/tech-radar/src/components/RadarDescription/index.ts +++ b/plugins/tech-radar/src/components/RadarDescription/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export { default } from './RadarDescription'; +export { RadarDescription, Props } from './RadarDescription'; diff --git a/plugins/tech-radar/src/components/RadarEntry/RadarEntry.tsx b/plugins/tech-radar/src/components/RadarEntry/RadarEntry.tsx index f146eb5fa8..fb47a75c71 100644 --- a/plugins/tech-radar/src/components/RadarEntry/RadarEntry.tsx +++ b/plugins/tech-radar/src/components/RadarEntry/RadarEntry.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { makeStyles, Theme } from '@material-ui/core'; import { WithLink } from '../../utils/components'; -import RadarDescription from '../RadarDescription'; +import { RadarDescription } from '../RadarDescription'; export type Props = { x: number; @@ -101,26 +101,26 @@ const RadarEntry = (props: Props): JSX.Element => { data-testid="radar-entry" > {' '} + {open && ( + + )} {description ? ( - <> - - {blip} - - - + + {blip} + ) : ( {blip} diff --git a/plugins/tech-radar/src/components/RadarLegend/RadarLegend.tsx b/plugins/tech-radar/src/components/RadarLegend/RadarLegend.tsx index 998a3370c1..d4ef38d5ee 100644 --- a/plugins/tech-radar/src/components/RadarLegend/RadarLegend.tsx +++ b/plugins/tech-radar/src/components/RadarLegend/RadarLegend.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { makeStyles, Theme } from '@material-ui/core'; import type { Quadrant, Ring, Entry } from '../../utils/types'; import { WithLink } from '../../utils/components'; -import RadarDescription from '../RadarDescription'; +import { RadarDescription } from '../RadarDescription'; type Segments = { [k: number]: { [k: number]: Entry[] }; @@ -131,7 +131,7 @@ const RadarLegend = (props: Props): JSX.Element => { setOpen(!open); }; - if (description && url) { + if (description) { return ( <> { > {title} - + {open && ( + + )} ); }