@anoki/fse-ui
Version:
FSE UI components library
95 lines (94 loc) • 3.1 kB
JavaScript
import { j as t } from "./index.es244.js";
import { clsx as o } from "./index.es246.js";
import { Col as c } from "./index.es10.js";
import { Row as e } from "./index.es9.js";
import './components/ui/AggregationItemCard/AggregationItemCard.css';/* empty css */
import { File as N } from "./index.es186.js";
import { Tag as v } from "./index.es106.js";
const T = ({
category: r,
tags: x = [],
totalTags: d = 2,
image: s,
title: i,
titleTag: p = "h1",
href: a,
isExternal: n = !1,
asImage: h = "img",
className: j,
handleOnClick: l
}) => {
const f = h;
return /* @__PURE__ */ t.jsxs(
"div",
{
className: o(
"ui-aggregation-item-card shadow br-x4 bg-white",
j,
l && "cursor-pointer"
),
children: [
/* @__PURE__ */ t.jsxs("div", { className: "category-header text-muted", children: [
/* @__PURE__ */ t.jsxs(e, { gap: "x4", alignItems: "center", className: "p-x0 m-x0", children: [
r && /* @__PURE__ */ t.jsx(
N,
{
fillColor: s != null && s.src ? "#fff" : "#5C6F82",
width: 30,
height: 30
}
),
(r == null ? void 0 : r.type) ?? " "
] }),
/* @__PURE__ */ t.jsx("p", { className: "date text-muted ", children: (r == null ? void 0 : r.published_at) ?? " " })
] }),
(s == null ? void 0 : s.src) && /* @__PURE__ */ t.jsxs("header", { className: "image", children: [
/* @__PURE__ */ t.jsx(
f,
{
src: s == null ? void 0 : s.src,
alt: s == null ? void 0 : s.alt,
title: s == null ? void 0 : s.title
}
),
/* @__PURE__ */ t.jsx("div", { className: "backdrop" })
] }),
/* @__PURE__ */ t.jsx(c, { className: "content-container gap-x16", children: /* @__PURE__ */ t.jsx(e, { alignItems: "center", justifyContent: "space-between", gap: "x4", children: /* @__PURE__ */ t.jsx(
"a",
{
className: "text-decoration-none",
href: a,
target: n ? "_blank" : void 0,
rel: n ? "noreferrer noopener" : void 0,
onClick: l ?? void 0,
children: /* @__PURE__ */ t.jsx(
p,
{
className: o(
"title",
"cursor-pointer hover-underline",
"text-primary fs-5 md-fs-custom-2"
),
children: i
}
)
}
) }) }),
/* @__PURE__ */ t.jsx(c, { className: "content-container gap-x16", children: /* @__PURE__ */ t.jsx(
e,
{
className: "topics-container",
gap: "x16",
flexWrap: "wrap",
alignItems: "flex-start",
children: x.slice(0, d).map((m, u) => /* @__PURE__ */ t.jsx(v, { ...m }, u))
}
) })
]
}
);
};
export {
T as AggregationItemCard
};
//# sourceMappingURL=index.es134.js.map