@brizy/ui
Version:
React elements in Brizy style
27 lines (26 loc) • 1.25 kB
JavaScript
import React from "react";
import { classNames } from "../classNamesFn";
import AntLayout from "antd/lib/layout";
import { getHexByColorType } from "../utils";
import { Align } from "../Align";
import { Inline } from "../Inline";
import { BRZ_PREFIX } from "../constants";
const { Footer: AntFooter } = AntLayout;
export const Footer = ({ color, bordered = true, left, right, fullWidth }) => {
const styles = {
[`--${BRZ_PREFIX}-footer-color`]: color ? getHexByColorType(color) : null,
};
const className = classNames()({
"layout-footer--color-inherit": color === "inherit",
"layout-footer--bordered": bordered,
});
const footerContentClassName = classNames()("layout-footer__content", {
"layout-footer__content--full-width": fullWidth,
});
return (React.createElement(AntFooter, { className: className, style: styles },
React.createElement("div", { className: footerContentClassName },
React.createElement(Align, { alignY: "center" },
React.createElement(Inline, { align: "between", alignY: "center" },
left,
React.createElement("div", { className: `${BRZ_PREFIX}-layout-footer__content-right` }, right))))));
};