UNPKG

@anoki/fse-ui

Version:

FSE UI components library

51 lines (50 loc) 2.01 kB
import { j as s } from "./index.es244.js"; import { clsx as c } from "./index.es246.js"; import { ArrowLink as f } from "./index.es42.js"; import './components/ui/FeaturedCard/FeaturedCard.css';/* empty css */ var x = /* @__PURE__ */ ((e) => (e.LANDSCAPE = "landscape", e.SQUARE = "square", e))(x || {}); const v = ({ sectionTitle: e = "", cardTitle: a = "", image: r, description: l = "", cta: t, cardFormat: n = "landscape", asLink: u = "a", asImage: o = "img" }) => { var d; const i = o; return /* @__PURE__ */ s.jsxs("section", { className: "ui-featured-card-section", children: [ e && /* @__PURE__ */ s.jsx("h2", { className: "ui-featured-card-section-title", children: e }), /* @__PURE__ */ s.jsxs( "div", { className: c( "ui-featured-card", n === "landscape" ? "ui-featured-card-landscape" : "ui-featured-card-square" ), children: [ (r == null ? void 0 : r.src) && /* @__PURE__ */ s.jsx("div", { className: "ui-featured-card-image", children: /* @__PURE__ */ s.jsx( i, { src: r == null ? void 0 : r.src, alt: r == null ? void 0 : r.alt, title: r == null ? void 0 : r.title } ) }), /* @__PURE__ */ s.jsxs("div", { className: "ui-featured-card-content", children: [ /* @__PURE__ */ s.jsx("h3", { className: c("cursor-pointer hover-underline ui-featured-card-title"), children: a }), /* @__PURE__ */ s.jsx("p", { className: c("fs-6 flex-1 md-fs-custom text-slate-20 ui-featured-card-description"), children: l }), /* @__PURE__ */ s.jsx("div", { className: "ui-featured-card-cta", children: /* @__PURE__ */ s.jsx(f, { href: t.href ?? "#", asLink: u, children: (d = t.label) == null ? void 0 : d.toUpperCase() }) }) ] }) ] } ) ] }); }; export { v as FeaturedCard, x as FeaturedCardFormatType }; //# sourceMappingURL=index.es130.js.map