UNPKG

@lanaco/lnc-react-ui

Version:

React component library

45 lines (44 loc) 1.58 kB
import { jsx as o, Fragment as a } from "react/jsx-runtime"; import { Suspense as g, forwardRef as d } from "react"; import { B as c } from "./index-Bdf71hkj.js"; import { b as u, a as p } from "./style-NhzYtIA7.js"; import { s as S } from "./emotion-styled.browser.esm-DfbrHHed.js"; import { d as f } from "./breakpoints-BubDitvo.js"; const m = S(u)` @media ${f("S")} { & > div { height: 13.25rem; } } `, h = ({ keyPrefix: n }) => /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(p, { width: "100%", height: "11.25rem" }, `${n}-0`) }), C = ({ keyPrefix: n, isLoading: t = !1, fallbackComponent: r = /* @__PURE__ */ o(a, {}), children: e }) => /* @__PURE__ */ o(g, { fallbackComponent: r, children: t === !0 ? /* @__PURE__ */ o(h, { keyPrefix: n }) : e }), v = d((n, t) => { const { isLoading: r, item: e, onSelectCard: l = () => { }, getImage: s = () => { }, LinkComponent: i } = n; return /* @__PURE__ */ o("div", { className: "lp-section lp-blog-single-section", children: /* @__PURE__ */ o(C, { isLoading: r, keyPrefix: "blogs-single-skeleton", children: /* @__PURE__ */ o( c, { ref: t, title: e == null ? void 0 : e.title, imageUrl: s(e == null ? void 0 : e.imageUrl, e == null ? void 0 : e.uuid) || null, text: e == null ? void 0 : e.description, titleSlug: e == null ? void 0 : e.titleSlug, buttonText: e == null ? void 0 : e.buttonText, onCardClick: () => l(e == null ? void 0 : e.titleSlug), LinkComponent: i } ) }) }); }); export { v as default };