@hitachivantara/uikit-react-core
Version:
UI Kit Core React components.
40 lines (39 loc) • 1.4 kB
JavaScript
import { HvTypography } from "../Typography/Typography.js";
import { useClasses } from "./Footer.styles.js";
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
import { forwardRef } from "react";
import { jsx, jsxs } from "react/jsx-runtime";
import { useTheme as useTheme$1 } from "@mui/material/styles";
import useMediaQuery from "@mui/material/useMediaQuery";
//#region src/Footer/Footer.tsx
/**
* A Footer is a way of providing extra information at the end of a page.
*/
var HvFooter = forwardRef(function HvFooter(props, ref) {
const { name, copyright, links, classes: classesProp, className, ...others } = useDefaultProps("HvFooter", props);
const muiTheme = useTheme$1();
const { classes, cx } = useClasses(classesProp);
const isSmDown = useMediaQuery(muiTheme.breakpoints.down("sm"));
return /* @__PURE__ */ jsxs("footer", {
ref,
className: cx(classes.root, { [classes.small]: isSmDown }, className),
...others,
children: [/* @__PURE__ */ jsx(HvTypography, {
variant: "label",
className: classes.name,
children: name
}), /* @__PURE__ */ jsxs("div", {
className: classes.rightContainer,
children: [
/* @__PURE__ */ jsx(HvTypography, {
className: classes.copyright,
children: copyright
}),
links && /* @__PURE__ */ jsx("div", { className: classes.separator }),
links
]
})]
});
});
//#endregion
export { HvFooter };