UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

48 lines (47 loc) • 1.47 kB
"use client"; import Icon from "../../Icon/Icon.mjs"; import { renderLandingLink } from "../landingLink.mjs"; import { styles } from "./style.mjs"; import { Fragment, memo } from "react"; import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime"; import { cx } from "antd-style"; //#region src/awesome/FeatureGrid/FeatureGrid.tsx const FeatureGrid = memo(({ className, columns = 3, items, renderLink, style, ...rest }) => /* @__PURE__ */ jsx("div", { className: cx(styles.grid, className), style: { "--feature-grid-columns": columns, ...style }, ...rest, children: items.map(({ description, href, icon, title }, index) => { const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [ icon && /* @__PURE__ */ jsx("span", { className: styles.icon, children: /* @__PURE__ */ jsx(Icon, { icon, size: 16 }) }), /* @__PURE__ */ jsx("h3", { className: styles.title, children: title }), /* @__PURE__ */ jsx("p", { className: styles.description, children: description }) ] }); return /* @__PURE__ */ jsx(Fragment, { children: href ? renderLandingLink(renderLink, { children: content, className: styles.item, href }) : /* @__PURE__ */ jsx("div", { className: styles.item, children: content }) }, typeof title === "string" ? title : index); }) })); FeatureGrid.displayName = "FeatureGrid"; //#endregion export { FeatureGrid as default }; //# sourceMappingURL=FeatureGrid.mjs.map