UNPKG

@rws-aoa/react-library

Version:

RWS AOA Design System

39 lines (38 loc) 1.36 kB
import { jsxs as m, jsx as a } from "react/jsx-runtime"; import { Grid as d, List as i, ListItem as c, ListItemText as u, listItemClasses as f } from "@mui/material"; import { l as g } from "../../../chunks/lodash.DPVO3Hgf.js"; import { Fragment as s } from "react"; import { FontNormalSxProps as x } from "../../../_constants.js"; function k({ listItems: o, "data-qa": l, sx: p }) { function e(r, t) { const n = t === "key"; return /* @__PURE__ */ a(c, { sx: { [`&.${f.root}`]: { padding: "0 10px 0 0", span: { fontSize: "1rem", lineHeight: "1.43rem" } } }, children: /* @__PURE__ */ a(u, { "data-qa": n ? null : r.dataQa, primary: r[t], sx: { span: { fontWeight: n ? "bold" : "normal" }, wrap: n ? "nowrap" : "normal" } }) }); } return /* @__PURE__ */ m(d, { container: !0, "data-qa": l ?? null, direction: "row", spacing: 1, sx: g.merge({ flexWrap: "nowrap" }, p, x), children: [ /* @__PURE__ */ a(i, { children: o.map((r, t) => /* @__PURE__ */ a(s, { children: e(r, "key") }, r.key.toString() + t)) }), /* @__PURE__ */ a(i, { children: o.map((r, t) => /* @__PURE__ */ a(s, { children: e(r, "value") }, typeof r.value == "string" ? r.value.toString() + t : t)) }) ] }); } export { k as AoaList }; //# sourceMappingURL=List.js.map