@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
31 lines • 1.02 kB
JavaScript
import { styled, AppBar } from '@mui/material';
var sizeHeader = {
small: '60px',
medium: '75px',
large: '90px'
};
export var CustomHeader = styled(AppBar, {
shouldForwardProp: function shouldForwardProp(props) {
return props !== 'sticky' && props !== 'backgroundColor' && props !== 'isBorder' && props !== 'minHeight' && props !== 'scrolled';
}
})(function (_ref) {
var isBorder = _ref.isBorder,
_ref$minHeight = _ref.minHeight,
minHeight = _ref$minHeight === void 0 ? 'small' : _ref$minHeight,
backgroundColor = _ref.backgroundColor,
scrolled = _ref.scrolled,
theme = _ref.theme;
return Object.assign({
backgroundColor: backgroundColor || theme.palette.background["default"],
boxShadow: 'none',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
minHeight: sizeHeader[minHeight],
width: '100%'
}, isBorder && {
borderBottom: "1px solid ".concat(theme.palette.divider)
}, scrolled && {
boxShadow: theme.shadows[1]
});
});