Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const SummaryItem = ({
className, size, id, data, loading, showBaselineValue, showDelta, showMetricDescription,
}) => {
const { baseline, current } = data || { baseline: 0, current: 0 };
const metric = getMetricType(id);
const diff = getDelta({ value: baseline }, { value: current });
const rootClassName = cx(
css.root,
className,
css[size],
showMetricDescription && css.showMetricDescription,
showBaselineValue && css.showBaselineValue,
);
return (
<div>
<h3>
{metric.label}
</h3>
</div>
const getMetricLabel = (key) => getMetricType(key).label;