import { get, keys } from 'lodash'; import React from 'react'; import './manifestLabels.less'; export interface IManifestLabelsMap { [key: string]: string; } export interface IManifestLabelsProps { manifest?: { metadata?: { labels?: IManifestLabelsMap; }; }; } export class ManifestLabels extends React.Component { public render() { const labels: IManifestLabelsMap = get(this.props, ['manifest', 'metadata', 'labels'], {}); return (
{keys(labels).map((key) => (
{key}: {labels[key]}
))}
); } }