UNPKG

@anoki/fse-ui

Version:

FSE UI components library

37 lines (36 loc) 1.41 kB
import { j as s } from "./index.es237.js"; import { SvgIcon as C } from "./index.es127.js"; import { CtaCardIcon as A } from "./index.es331.js"; import { RichText as _ } from "./index.es143.js"; import './components/ui/CardFaqCTA/CardFaqCTA.css';/* empty css */ var x = /* @__PURE__ */ ((r) => (r.FAQ = "FAQ", r.CTA = "CTA", r.CTAICON = "CTAICON", r))(x || {}); const p = ({ type: r = "Evento", title: e, description: a, link: i, openModal: m, isExternal: c, asLink: t = "a", icon: n }) => { const l = r === "FAQ" ? "div" : t, o = r === "FAQ" ? "faq-card" : r === "CTA" ? "cta-card" : "cta-icon-card", d = r === "FAQ" ? { className: o, onClick: m } : { href: i, target: c ? "_blank" : void 0, rel: c ? "noopener noreferrer" : void 0, className: o }; return /* @__PURE__ */ s.jsxs(l, { ...d, children: [ /* @__PURE__ */ s.jsx("div", { className: `${o}__header`, children: /* @__PURE__ */ s.jsx("h1", { className: `${o}__title`, children: e }) }), r === "FAQ" && a && /* @__PURE__ */ s.jsx("div", { className: `${o}__description`, children: /* @__PURE__ */ s.jsx(_, { description: a }) }), r === "CTAICON" && (n ? /* @__PURE__ */ s.jsx(C, { icon: n, className: `${o}__icon` }) : /* @__PURE__ */ s.jsx(A, { className: `${o}__icon` })) ] }); }; export { p as CardFaqCTA, x as CardFaqCTAType }; //# sourceMappingURL=index.es43.js.map