@lanaco/lnc-react-ui
Version:
React component library
31 lines (30 loc) • 955 B
JavaScript
import { jsx as o } from "react/jsx-runtime";
import { memo as g, forwardRef as u, useMemo as t } from "react";
import { C as f } from "./CategorySimpleCard-BE6F0PFT.js";
import { W as l } from "./style-BzaX45du.js";
const n = g(f), w = u(
({
items: a,
onSelectCard: e = () => {
},
isHighlight: i = !1
}, p) => {
const d = t(() => {
var m;
return (m = a == null ? void 0 : a.slice(0, 4)) == null ? void 0 : m.map((r, s) => /* @__PURE__ */ o(
n,
{
uuid: r == null ? void 0 : r.uuid,
image: r == null ? void 0 : r.image,
name: r == null ? void 0 : r.name,
onSelectCard: () => e == null ? void 0 : e(r == null ? void 0 : r.uuid)
},
s
));
}, [a]);
return /* @__PURE__ */ o(l, { ref: p, className: i ? "highlight" : "", children: /* @__PURE__ */ o("div", { className: "wrapper__grid", children: d }) });
}
);
export {
w as default
};