1 | import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
2 | import { jsx as _jsx } from "react/jsx-runtime";
|
3 | import { ConfigProvider } from 'antd';
|
4 | import classNames from 'classnames';
|
5 | import { useContext } from 'react';
|
6 | import { RouteContext } from '../../context/RouteContext';
|
7 | import { useStyle } from './style';
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | var GridContent = function GridContent(props) {
|
15 | var value = useContext(RouteContext);
|
16 | var children = props.children,
|
17 | propsContentWidth = props.contentWidth,
|
18 | propsClassName = props.className,
|
19 | style = props.style;
|
20 | var _useContext = useContext(ConfigProvider.ConfigContext),
|
21 | getPrefixCls = _useContext.getPrefixCls;
|
22 | var prefixCls = props.prefixCls || getPrefixCls('pro');
|
23 | var contentWidth = propsContentWidth || value.contentWidth;
|
24 | var className = "".concat(prefixCls, "-grid-content");
|
25 | var _useStyle = useStyle(className),
|
26 | wrapSSR = _useStyle.wrapSSR,
|
27 | hashId = _useStyle.hashId;
|
28 | var isWide = contentWidth === 'Fixed';
|
29 | return wrapSSR(_jsx("div", {
|
30 | className: classNames(className, hashId, propsClassName, _defineProperty({}, "".concat(className, "-wide"), isWide)),
|
31 | style: style,
|
32 | children: _jsx("div", {
|
33 | className: "".concat(prefixCls, "-grid-content-children ").concat(hashId),
|
34 | children: children
|
35 | })
|
36 | }));
|
37 | };
|
38 | export { GridContent }; |
\ | No newline at end of file |