UNPKG

@wulperstudio/cms

Version:
30 lines 1.03 kB
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; var _excluded = ["children", "variant", "isPadding"], _excluded2 = ["sx"]; /* eslint-disable no-nested-ternary */ import React from 'react'; import { Box, useTheme } from '@mui/material'; import { jsx as _jsx } from "react/jsx-runtime"; export var ContainerBlockWeb = function ContainerBlockWeb(_ref) { var children = _ref.children, variant = _ref.variant, isPadding = _ref.isPadding, props = _objectWithoutProperties(_ref, _excluded); var theme = useTheme(); var sx = props.sx, rest = _objectWithoutProperties(props, _excluded2); return /*#__PURE__*/_jsx(Box, Object.assign({ component: "article", sx: Object.assign({ borderRadius: '1.2rem' }, variant === 'float' && { boxShadow: theme.shadows[1] }, variant === 'border' && { border: "1px solid ".concat(theme.palette.divider) }, isPadding && { padding: '1.5rem' }, sx) }, rest, { children: children })); };