UNPKG

@anoki/fse-ui

Version:

FSE UI components library

52 lines (51 loc) 2.06 kB
import { j as e } from "./index.es237.js"; import { Image as l } from "./index.es345.js"; import { ArrowLink as m } from "./index.es25.js"; import { SectionHeading as _ } from "./index.es123.js"; import './components/ui/CardPreview/CardPreview.css';/* empty css */ import { RichText as h } from "./index.es143.js"; var x = /* @__PURE__ */ ((s) => (s.WITH_TOPIC_DATE = "withTopicDate", s.NO_TOPIC_DATE = "noTopicDate", s))(x || {}); const f = ({ variant: s = "withTopicDate", sectionTitle: n = "", imageUrl: r, title: t, description: d, link: a, asLink: o, date: i, topic: c }) => /* @__PURE__ */ e.jsxs("section", { className: "card-preview-section", children: [ /* @__PURE__ */ e.jsx( _, { title: n, className: "card-preview-section-title" } ), /* @__PURE__ */ e.jsxs("div", { className: "news-card", children: [ /* @__PURE__ */ e.jsx("div", { className: "news-card__image", children: r ? /* @__PURE__ */ e.jsx("img", { src: r, alt: "Anteprima" }) : /* @__PURE__ */ e.jsx("div", { className: "placeholder-icon", children: /* @__PURE__ */ e.jsx(l, { width: 20, height: 20 }) }) }), s === "withTopicDate" && (c || i) && /* @__PURE__ */ e.jsxs("div", { className: "news-card__info", children: [ /* @__PURE__ */ e.jsx("div", { className: "news-card__info__topic", children: c || "" }), /* @__PURE__ */ e.jsx("div", { className: "news-card__info__date", children: i || "" }) ] }), /* @__PURE__ */ e.jsxs("div", { className: "news-card__content", children: [ /* @__PURE__ */ e.jsx("h1", { className: "news-card__title", children: t }), /* @__PURE__ */ e.jsx("div", { className: "news-card__description", children: /* @__PURE__ */ e.jsx(h, { description: d }) }), /* @__PURE__ */ e.jsx( m, { className: "news-card__cta", href: a.link, asLink: o, children: a.title } ) ] }) ] }) ] }); export { f as CardPreview, x as CardPreviewVariant }; //# sourceMappingURL=index.es52.js.map