myprojectpackageprav
Version:
My package in npm
25 lines • 1.55 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("react");
var detail_kpis_data_1 = require("./detail-kpis-data");
function DetailKPIs(props) {
var _a = (0, react_1.useState)([]), data = _a[0], setData = _a[1];
(0, react_1.useEffect)(function () {
if ((props === null || props === void 0 ? void 0 : props.accordiontitle) === 'discovery') {
setData(detail_kpis_data_1.discovery);
}
if ((props === null || props === void 0 ? void 0 : props.accordiontitle) === 'appointingauthority') {
setData(detail_kpis_data_1.appointingauthority);
}
}, [props === null || props === void 0 ? void 0 : props.accordiontitle]);
var listItems = data.map(function (kpiitem) {
return React.createElement("div", { className: "col col-md-6 align-items-stretch d-flex" },
React.createElement("a", { tabIndex: 0, className: "kpiborder align-items-center shadow6 kpiborderbottom border-radius text-decoration-none d-flex flex-column w-100", title: kpiitem.title, "status-kpis": kpiitem.colorcode, "aria-live": 'polite' },
React.createElement("span", { className: "font-16" }, kpiitem.count),
React.createElement("span", { className: "font-12 latobold text-nowrap text-uppercase" }, kpiitem.title)));
});
return (React.createElement(React.Fragment, null,
React.createElement("div", { className: 'row' }, listItems)));
}
exports.default = DetailKPIs;
//# sourceMappingURL=detail-kpis.js.map