@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
19 lines • 724 B
JavaScript
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["sx"];
import React from 'react';
import { useHeightViewPort } from './utils';
import { BaseElementLayout } from './styled';
import { jsx as _jsx } from "react/jsx-runtime";
var RootLayout = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
var sx = _ref.sx,
other = _objectWithoutProperties(_ref, _excluded);
var height = useHeightViewPort();
var styleWithRealHeight = Object.assign({}, sx, {
height: height ? "".concat(height, "px") : '100vh'
});
return /*#__PURE__*/_jsx(BaseElementLayout, Object.assign({
ref: ref,
sx: styleWithRealHeight
}, other));
});
export default RootLayout;