UNPKG

@anoki/fse-ui

Version:

FSE UI components library

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