UNPKG

@lobehub/ui

Version:

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

36 lines (35 loc) • 1.29 kB
"use client"; import Spin from "../../base-ui/Spin/Spin.mjs"; import Skeleton from "../../base-ui/Skeleton/index.mjs"; import { styles } from "../Surface/style.mjs"; import Surface from "../Surface/Surface.mjs"; import { styles as styles$1 } from "./style.mjs"; import { jsx } from "react/jsx-runtime"; import { cx } from "antd-style"; //#region src/dashboard/PanelSurface/PanelSurface.tsx /** Titled console panel. Body padding stays inside so a trailing table can bleed to the edges. */ const PanelSurface = ({ title, description, extra, href, loading, renderLink, size = "default", className, style, children }) => /* @__PURE__ */ jsx(Surface, { className, description, extra: loading && children ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : extra, href, padded: false, renderLink, style, title, children: loading && !children ? /* @__PURE__ */ jsx("div", { "aria-busy": "true", className: styles$1.loadingBody, children: /* @__PURE__ */ jsx(Skeleton, { height: 220, radius: 8 }) }) : /* @__PURE__ */ jsx("div", { className: cx(size === "small" ? styles$1.bodySmall : styles$1.body, styles.tableBleed), children }) }); PanelSurface.displayName = "PanelSurface"; //#endregion export { PanelSurface as default }; //# sourceMappingURL=PanelSurface.mjs.map