@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
35 lines (32 loc) • 1.01 kB
JavaScript
'use client';
import FlexBasic_default from "../Flex/FlexBasic.mjs";
import { styles } from "./style.mjs";
import { memo, useMemo } from "react";
import { jsx, jsxs } from "react/jsx-runtime";
import RcFooter from "rc-footer";
//#region src/Footer/Footer.tsx
const Footer = memo(({ columns, bottom, theme, contentMaxWidth = 960, children, style, ...rest }) => {
const isEmpty = !columns || columns?.length === 0;
const cssVariables = useMemo(() => ({ "--footer-content-max-width": `${contentMaxWidth}px` }), [contentMaxWidth]);
return /* @__PURE__ */ jsxs(FlexBasic_default, {
as: "section",
className: styles.root,
style: {
...cssVariables,
...style
},
width: "100%",
...rest,
children: [/* @__PURE__ */ jsx(RcFooter, {
bottom,
className: isEmpty ? styles.footerEmpty : styles.footer,
columns,
theme
}), children]
});
});
Footer.displayName = "Footer";
var Footer_default = Footer;
//#endregion
export { Footer_default as default };
//# sourceMappingURL=Footer.mjs.map