UNPKG

@wulperstudio/cms

Version:
51 lines 2.07 kB
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; var _excluded = ["columns", "containerColumnsProps", "containerProps", "subFooter"], _excluded2 = ["component", "sx"], _excluded3 = ["sx"]; import React from 'react'; import { Box, Container, Typography, useTheme } from '@mui/material'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; export var BaseFooter = function BaseFooter(_ref) { var columns = _ref.columns, containerColumnsProps = _ref.containerColumnsProps, containerProps = _ref.containerProps, subFooter = _ref.subFooter, props = _objectWithoutProperties(_ref, _excluded); var theme = useTheme(); var _props$component = props.component, component = _props$component === void 0 ? 'footer' : _props$component, sx = props.sx, rest = _objectWithoutProperties(props, _excluded2); var _ref2 = containerColumnsProps || {}, columnsSx = _ref2.sx, restColumnsProps = _objectWithoutProperties(_ref2, _excluded3); return /*#__PURE__*/_jsx(Box, Object.assign({ component: component, sx: Object.assign({ backgroundColor: theme.palette.background["default"], padding: 0, borderTop: "1px solid ".concat(theme.palette.divider) }, sx) }, rest, { children: /*#__PURE__*/_jsxs(Container, Object.assign({}, containerProps, { children: [/*#__PURE__*/_jsx(Box, Object.assign({ sx: Object.assign(_defineProperty({ display: 'grid', gap: '1rem' }, theme.breakpoints.up('md'), { gridAutoFlow: 'column', gridAutoColumns: 'fit-content' }), columnsSx) }, restColumnsProps, { children: columns })), subFooter || /*#__PURE__*/_jsx(Box, { children: /*#__PURE__*/_jsxs(Typography, { variant: "body1", textAlign: "center", children: ["Copyright \xA9", ' ', new Date().getFullYear(), ". All rights reserved."] }) })] })) })); };