X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/47e0dc87fa82bac593c53518e556ba7c55410288..dd89200ad6fdbfa337fdbab5f54def8712c6746c:/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 56da6c17..d3a83918 100644 --- a/src/components/details-attribute/details-attribute.tsx +++ b/src/components/details-attribute/details-attribute.tsx @@ -5,7 +5,8 @@ import * as React from 'react'; import Typography from '@material-ui/core/Typography'; import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'; -import { ArvadosTheme } from '../../common/custom-theme'; +import { ArvadosTheme } from '~/common/custom-theme'; +import * as classnames from "classnames"; type CssRules = 'attribute' | 'label' | 'value' | 'link'; @@ -35,19 +36,21 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ interface DetailsAttributeDataProps { label: string; + classLabel?: string; value?: string | number; + classValue?: string; link?: string; children?: React.ReactNode; } type DetailsAttributeProps = DetailsAttributeDataProps & WithStyles; -export const DetailsAttribute = withStyles(styles)(({ label, link, value, children, classes }: DetailsAttributeProps) => +export const DetailsAttribute = withStyles(styles)(({ label, link, value, children, classes, classLabel, classValue }: DetailsAttributeProps) => - {label} + {label} { link ? {value} - : + : {value} {children} }