@anoki/fse-ui
Version:
FSE UI components library
49 lines (48 loc) • 2.36 kB
JavaScript
import { j as i } from "./index.es237.js";
import { createElement as j } from "react";
import './sections/CommunicationContentsHome/CommunicationContentsHome.css';/* empty css */
import f from "./index.es265.js";
import { AggregationItemCard as m } from "./index.es22.js";
import { SectionHeading as u } from "./index.es123.js";
import { Row as n } from "./index.es116.js";
import { Spinner as l } from "./index.es226.js";
import { Button as g } from "./index.es32.js";
function E({
title: s,
elements: r = [],
total: t,
totalLabels: o = { first: "Stai visualizzando", middle: "di", end: "elementi" },
handleLoadMore: d,
loading: c = !1,
showMoreTitle: p = "Visualizza altro ",
noResultsLabel: x = "Nessun risultato trovato"
}) {
const h = t > (r == null ? void 0 : r.length);
return /* @__PURE__ */ i.jsxs("section", { className: "communication-contents d-flex section-gap flex-column", children: [
/* @__PURE__ */ i.jsx(u, { className: "title", title: s }),
/* @__PURE__ */ i.jsx(
f,
{
columns: { 0: 1, 768: 2, 992: 3 },
gap: 24,
className: "masonry-component",
children: r == null ? void 0 : r.map((a) => /* @__PURE__ */ j(m, { ...a, key: a._id }))
}
),
/* @__PURE__ */ i.jsx(n, { className: "w-full-adpt", justifyContent: "center", m: "x12", children: c && /* @__PURE__ */ i.jsx(l, { height: 30, width: 30 }) }),
/* @__PURE__ */ i.jsx("span", { className: "total-elements-label", children: (r == null ? void 0 : r.length) === 0 ? /* @__PURE__ */ i.jsx("span", { children: x }) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
/* @__PURE__ */ i.jsx("span", { children: o.first }),
/* @__PURE__ */ i.jsxs(n, { justifyContent: "center", gap: "x4", children: [
/* @__PURE__ */ i.jsx("b", { children: r == null ? void 0 : r.length }),
/* @__PURE__ */ i.jsx("span", { children: o.middle }),
/* @__PURE__ */ i.jsx("span", { children: t }),
/* @__PURE__ */ i.jsx("span", { children: o.end })
] })
] }) }),
h && !c && (r == null ? void 0 : r.length) > 0 && /* @__PURE__ */ i.jsx(n, { justifyContent: "center", alignItems: "center", mt: "x16", children: /* @__PURE__ */ i.jsx(g, { onClick: d, children: p }) })
] });
}
export {
E as CommunicationContents
};
//# sourceMappingURL=index.es154.js.map