myprojectpackageprav
Version:
My package in npm
22 lines • 1.42 kB
JavaScript
import { useState, useEffect } from 'react';
import { discovery, appointingauthority } from './detail-kpis-data';
export default function DetailKPIs(props) {
var _a = useState([]), data = _a[0], setData = _a[1];
useEffect(function () {
if ((props === null || props === void 0 ? void 0 : props.accordiontitle) === 'discovery') {
setData(discovery);
}
if ((props === null || props === void 0 ? void 0 : props.accordiontitle) === 'appointingauthority') {
setData(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)));
}
//# sourceMappingURL=detail-kpis.js.map