@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
59 lines • 2.29 kB
JavaScript
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["sx"],
_excluded2 = ["sx", "className"],
_excluded3 = ["sx", "className"];
import { Box, useTheme } from '@mui/material';
import React from 'react';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
export var LayoutMenuContent = function LayoutMenuContent(_ref) {
var menu = _ref.menu,
children = _ref.children,
RootProps = _ref.RootProps,
MenuSlotProps = _ref.MenuSlotProps,
ChildSlotProps = _ref.ChildSlotProps;
var _ref2 = RootProps || {},
sxRoot = _ref2.sx,
rootProps = _objectWithoutProperties(_ref2, _excluded);
var _ref3 = MenuSlotProps || {},
sxMenu = _ref3.sx,
menuClassName = _ref3.className,
menuProps = _objectWithoutProperties(_ref3, _excluded2);
var _ref4 = ChildSlotProps || {},
sxChild = _ref4.sx,
childClassName = _ref4.className,
childProps = _objectWithoutProperties(_ref4, _excluded3);
var _useTheme = useTheme(),
breakpoints = _useTheme.breakpoints;
return /*#__PURE__*/_jsxs(Box, Object.assign({}, rootProps, {
sx: Object.assign({
display: 'grid',
gridTemplateColumns: 'auto 1fr',
width: '100%',
height: '100%',
columnGap: 1.25
}, sxRoot, _defineProperty({}, breakpoints.down('md'), Object.assign({
gridTemplateColumns: '1fr',
gridTemplateRows: 'auto 1fr'
}, (sxRoot == null ? void 0 : sxRoot[breakpoints.down('md')]) || {}))),
children: [/*#__PURE__*/_jsx(Box, Object.assign({}, menuProps, {
sx: Object.assign({
width: '100%',
height: '100%',
overflow: 'auto'
}, sxMenu),
className: "".concat(menuClassName || '', " menu__slot"),
children: menu
})), /*#__PURE__*/_jsx(Box, Object.assign({}, childProps, {
sx: Object.assign({
width: '100%',
height: '100%',
overflow: 'auto'
}, sxChild, _defineProperty({}, breakpoints.down('md'), Object.assign({
overflow: 'unset'
}, (sxChild == null ? void 0 : sxChild[breakpoints.down('md')]) || {}))),
className: "".concat(childClassName || '', " child__slot"),
children: children
}))]
}));
};