UNPKG

@anoki/fse-ui

Version:

FSE UI components library

95 lines (94 loc) 3.26 kB
import { j as s } from "./index.es180.js"; import { clsx as c } from "./index.es182.js"; import { ArrowLink as y } from "./index.es35.js"; import './components/ui/CardCategory/CardCategory.css';/* empty css */ import { ExternalLink as N } from "./index.es114.js"; import { Col as v } from "./index.es10.js"; import { Row as C } from "./index.es9.js"; const q = ({ image: r, title: a, titleTag: d = "h3", href: n, description: i, description2: p, isExternal: t = !1, showIcon: x = !1, goToLabel: e, asLink: h = "a", asImage: f = "img", className: u, classNameTitle: o, classNameDescription: j, handleOnClick: l }) => { const m = f, w = h; return /* @__PURE__ */ s.jsxs( w, { className: c( "ui-card-category shadow br-x4 bg-white", u, l && "cursor-pointer" ), href: n, target: t ? "_blank" : void 0, rel: t ? "noreferrer noopener" : void 0, onClick: l ?? void 0, children: [ (r == null ? void 0 : r.src) && /* @__PURE__ */ s.jsx("header", { className: "ui-card-category-header", children: /* @__PURE__ */ s.jsx( m, { src: r == null ? void 0 : r.src, alt: r == null ? void 0 : r.alt, title: r == null ? void 0 : r.title } ) }), /* @__PURE__ */ s.jsxs( v, { className: c( r != null && r.src ? "ui-card-category-content-with-image ui-mt-negative" : "ui-card-category-content", "gap-x8 br-x4 bg-white" ), children: [ /* @__PURE__ */ s.jsxs(C, { alignItems: "center", justifyContent: "space-between", gap: "x4", children: [ /* @__PURE__ */ s.jsxs( d, { className: c( "flex-1 cursor-pointer hover-underline", o || "text-primary fs-5 md-fs-custom-2" ), children: [ a, t && /* @__PURE__ */ s.jsx("span", { className: "visually-hidden", children: "(si apre in una nuova finestra)" }) ] } ), x && /* @__PURE__ */ s.jsx("span", { children: /* @__PURE__ */ s.jsx( N, { width: 24, height: 24, color: "primary", className: "ui-external-link" } ) }) ] }), /* @__PURE__ */ s.jsxs("div", { className: c(j), children: [ /* @__PURE__ */ s.jsx("p", { className: "fs-6 md-fs-custom fw-regular text-slate-28", children: i }), /* @__PURE__ */ s.jsx("p", { className: "fs-6 md-fs-custom fw-regular text-slate-28", children: p }) ] }) ] } ), e && n && /* @__PURE__ */ s.jsx("footer", { className: "ui-card-category-footer bg-white", children: /* @__PURE__ */ s.jsx(y, { href: n ?? "#", isExternal: t, children: e == null ? void 0 : e.toUpperCase() }) }) ] } ); }; export { q as CardCategory }; //# sourceMappingURL=index.es26.js.map