@anoki/fse-ui
Version:
FSE UI components library
75 lines (74 loc) • 2.55 kB
JavaScript
import { j as e } from "./index.es278.js";
import { clsx as c } from "./index.es280.js";
import { ArrowLink as h } from "./index.es21.js";
import './components/ui/FeaturedCard/FeaturedCard.css';/* empty css */
import { SectionHeading as x } from "./index.es229.js";
var p = /* @__PURE__ */ ((s) => (s.LANDSCAPE = "landscape", s.SQUARE = "square", s))(p || {});
const C = ({
sectionTitle: s = "",
cardTitle: a = "",
image: r,
description: i = "",
cta: t,
cardFormat: o = "landscape",
asLink: d = "a",
asImage: u = "img"
}) => {
var n;
const f = u, l = d;
return /* @__PURE__ */ e.jsxs("section", { className: "ui-featured-card-section", children: [
/* @__PURE__ */ e.jsx(
x,
{
className: "ui-featured-card-section-title",
title: s,
titleMarginBottom: "0"
}
),
/* @__PURE__ */ e.jsxs(
"div",
{
className: c(
"ui-featured-card",
o === "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(
f,
{
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: c(
"cursor-pointer hover-underline ui-featured-card-title"
),
children: /* @__PURE__ */ e.jsx(l, { className: "link-unstyled", href: t.href, children: a })
}
),
/* @__PURE__ */ e.jsx(
"p",
{
className: c(
"fs-6 flex-1 md-fs-custom text-slate-20 ui-featured-card-description"
),
children: /* @__PURE__ */ e.jsx(l, { className: "link-unstyled", href: t.href, children: i })
}
),
/* @__PURE__ */ e.jsx("div", { className: "ui-featured-card-cta", children: /* @__PURE__ */ e.jsx(h, { href: t.href ?? "#", asLink: d, children: (n = t.label) == null ? void 0 : n.toUpperCase() }) })
] })
]
}
)
] });
};
export {
C as FeaturedCard,
p as FeaturedCardFormatType
};
//# sourceMappingURL=index.es131.js.map