lml-main
Version:
This is now a mono repository published into many standalone packages.
23 lines • 1.38 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const lodash_1 = require("lodash");
const cosmoui_1 = require("cosmoui");
class JobIncidentBar extends cosmoui_1.StylableComponent {
constructor() {
super(...arguments);
this.fitContent = {
minHeight: 'fit-content',
wordBreak: 'break-word',
};
}
render() {
const { incidents } = this.props;
return incidents && incidents.map((incident) => (React.createElement(cosmoui_1.FeatureBar, { key: incident.incidentId, id: "incidentBar", name: `incident${incident.incidentId}`, style: this.fitContent },
React.createElement(cosmoui_1.FeatureBarItem, { justify: "flex-start", basis: "33%", id: `incident-impact-${incident.incidentId}` }, lodash_1.get(incident, 'impact.description', '')),
React.createElement(cosmoui_1.FeatureBarItem, { justify: "flex-start", basis: "33%", id: `incident-reason-${incident.incidentId}` }, lodash_1.get(incident, 'reason.description', '')),
React.createElement(cosmoui_1.FeatureBarItem, { justify: "flex-start", basis: "34%", id: `incident-comment-${incident.incidentId}`, style: this.fitContent }, lodash_1.get(incident, 'comment', '')))));
}
}
exports.JobIncidentBar = JobIncidentBar;
//# sourceMappingURL=job-incident-bar.js.map