@anoki/fse-ui
Version:
FSE UI components library
59 lines (58 loc) • 2.11 kB
JavaScript
import { j as o } from "./index.es278.js";
import { createElement as p } from "react";
import './sections/CommunicationContentsHome/CommunicationContentsHome.css';/* empty css */
import { SectionHeading as d } from "./index.es229.js";
import { ArrowLink as x } from "./index.es21.js";
import { AggregationItemCard as f } from "./index.es15.js";
import { Row as h } from "./index.es219.js";
import { Spinner as j } from "./index.es235.js";
function S({
sectionId: i,
title: s,
elements: t = [],
loading: m = !1,
noResultsLabel: c = "Nessun risultato trovato",
linkHref: r,
linkLabel: l = "Scopri tutti",
asLink: e = "a"
}) {
const a = i ? `${i}-title` : void 0;
return /* @__PURE__ */ o.jsxs(
"section",
{
id: i,
"aria-labelledby": a,
className: "communication-contents d-flex section-gap flex-column",
children: [
/* @__PURE__ */ o.jsx(
d,
{
className: "title pb-x16",
title: s,
titleId: a,
color: "slate-20",
mdFs: "2",
titleMarginBottom: "mb-x0",
descriptionMarginBottom: "mb-x0",
children: r && /* @__PURE__ */ o.jsx(x, { href: r, asLink: e, fs: "7", children: l.toUpperCase() })
}
),
/* @__PURE__ */ o.jsx("div", { className: "masonry-component", children: t == null ? void 0 : t.map((n) => /* @__PURE__ */ p(f, { ...n, key: n._id })) }),
/* @__PURE__ */ o.jsx(h, { className: "w-full-adpt", justifyContent: "center", m: "x12", children: m && /* @__PURE__ */ o.jsx(
"div",
{
role: "status",
"aria-live": "polite",
"aria-label": "Caricamento in corso",
children: /* @__PURE__ */ o.jsx(j, { height: 30, width: 30 })
}
) }),
/* @__PURE__ */ o.jsx("p", { className: "total-elements-label", children: (t == null ? void 0 : t.length) === 0 && /* @__PURE__ */ o.jsx("span", { children: c }) })
]
}
);
}
export {
S as CommunicationContentsHome
};
//# sourceMappingURL=index.es84.js.map