X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ada23a4054724d0d6be4ee88efb22daecd86001f..2d9dcf3d61d410328e081b5b00c7175c7eb1d82b:/src/components/details-attribute/details-attribute.tsx diff --git a/src/components/details-attribute/details-attribute.tsx b/src/components/details-attribute/details-attribute.tsx index d255d14b1b..b8955d4e33 100644 --- a/src/components/details-attribute/details-attribute.tsx +++ b/src/components/details-attribute/details-attribute.tsx @@ -7,6 +7,7 @@ import Typography from '@material-ui/core/Typography'; import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'; import { ArvadosTheme } from '~/common/custom-theme'; import * as classnames from "classnames"; +import { Link } from 'react-router-dom'; type CssRules = 'attribute' | 'label' | 'value' | 'lowercaseValue' | 'link'; @@ -49,23 +50,25 @@ interface DetailsAttributeDataProps { link?: string; children?: React.ReactNode; onValueClick?: () => void; + linkInsideCard?: string; } type DetailsAttributeProps = DetailsAttributeDataProps & WithStyles; export const DetailsAttribute = withStyles(styles)( - ({ label, link, value, children, classes, classLabel, classValue, lowercaseValue, onValueClick }: DetailsAttributeProps) => + ({ label, link, value, children, classes, classLabel, classValue, lowercaseValue, onValueClick, linkInsideCard }: DetailsAttributeProps) => {label} - { link - ? {value} - : - {value} - {children} - } + {link && {value}} + {linkInsideCard && {value}} + {!link && !linkInsideCard && + {value} + {children} + + } + );