@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
39 lines (38 loc) • 1.17 kB
JavaScript
"use client";
import { renderLandingLink } from "../landingLink.mjs";
import { styles } from "./style.mjs";
import { memo } from "react";
import { jsx, jsxs } from "react/jsx-runtime";
import { cx } from "antd-style";
//#region src/awesome/BentoGrid/BentoCard.tsx
const BentoCard = memo(({ children, className, colSpan = 1, hint, href, renderLink, rowSpan = 1, style, title, ...rest }) => /* @__PURE__ */ jsxs("div", {
className: cx(styles.card, className),
"data-wide": colSpan > 2,
style: {
"--bento-col-span": colSpan,
"--bento-row-span": rowSpan,
...style
},
...rest,
children: [(title || hint) && /* @__PURE__ */ jsxs("div", {
className: styles.header,
children: [title && (href ? renderLandingLink(renderLink, {
children: title,
className: styles.title,
href
}) : /* @__PURE__ */ jsx("span", {
className: styles.title,
children: title
})), hint && /* @__PURE__ */ jsx("span", {
className: styles.hint,
children: hint
})]
}), /* @__PURE__ */ jsx("div", {
className: styles.body,
children
})]
}));
BentoCard.displayName = "BentoCard";
//#endregion
export { BentoCard as default };
//# sourceMappingURL=BentoCard.mjs.map