@anoki/fse-ui
Version:
FSE UI components library
52 lines (51 loc) • 1.52 kB
JavaScript
import { j as s } from "./index.es278.js";
import { CardFaqCTA as p, CardFaqCTAType as l } from "./index.es49.js";
import './sections/FaqSections/FaqSections.css';/* empty css */
import { Section as x, SectionHeading as f } from "./index.es229.js";
import { RichText as j } from "./index.es218.js";
function y(t) {
return t ? typeof t != "string" ? !1 : t.replace(/<[^>]*>/g, "").replace(/ /g, "").trim().length === 0 : !0;
}
const C = ({
title: t,
description: i,
items: o = [],
colorTitle: n = "primary",
fontSizeTitle: e = "4",
handleOpenModal: c
}) => /* @__PURE__ */ s.jsxs(x, { className: "faq-sections", children: [
/* @__PURE__ */ s.jsx(
f,
{
title: t,
color: n,
fs: e,
description: y(i) ? void 0 : /* @__PURE__ */ s.jsx(j, { description: i }),
className: "faq-sections__title"
}
),
/* @__PURE__ */ s.jsx(
"ul",
{
role: "list",
"aria-label": `Lista di ${t}`,
className: "faq-sections__list",
children: o == null ? void 0 : o.map((r, a) => /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
p,
{
type: r.type,
title: r.title,
description: r.description,
link: r.link ?? "",
isExternal: r.isExternal,
openModal: r.type === l.FAQ ? () => c == null ? void 0 : c(r) : void 0,
icon: r.icon
}
) }, r.key ?? a))
}
)
] });
export {
C as FaqSections
};
//# sourceMappingURL=index.es129.js.map