@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
37 lines (36 loc) • 1.14 kB
JavaScript
"use client";
import FlexBasic_default from "../../Flex/FlexBasic.mjs";
import Text from "../../base-ui/Text/Text.mjs";
import { styles } from "./style.mjs";
import { jsx, jsxs } from "react/jsx-runtime";
//#region src/dashboard/PageHeader/PageHeader.tsx
function PageHeader({ action, children, description, mark, title }) {
const extra = action ?? children;
return /* @__PURE__ */ jsxs("div", {
className: styles.root,
children: [/* @__PURE__ */ jsxs(FlexBasic_default, {
align: mark ? "flex-start" : void 0,
gap: 12,
horizontal: Boolean(mark),
children: [mark, /* @__PURE__ */ jsxs(FlexBasic_default, {
gap: 8,
children: [/* @__PURE__ */ jsx(Text, {
as: "h1",
className: styles.title,
weight: "bold",
children: title
}), description ? /* @__PURE__ */ jsx(Text, {
className: styles.description,
children: description
}) : null]
})]
}), extra ? /* @__PURE__ */ jsx("div", {
className: styles.actions,
children: extra
}) : null]
});
}
PageHeader.displayName = "PageHeader";
//#endregion
export { PageHeader as default };
//# sourceMappingURL=PageHeader.mjs.map