linkmore-design
Version:
π πlmη»δ»ΆεΊγπ
30 lines β’ 1.03 kB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import React, { useRef } from 'react';
import Layout from "../layout/Container";
import Table from "../table";
import ErrorBoundaryFallback from "./ErrorBoundary";
var Wrapper = function Wrapper(props) {
var height = props.height,
resizeConfig = props.resizeConfig,
prefixCls = props.prefixCls,
ErrorBoundary = props.ErrorBoundary;
var resizeRef = useRef();
return /*#__PURE__*/React.createElement(Layout, {
className: "".concat(prefixCls, "_layout"),
style: {
height: height
}
}, /*#__PURE__*/React.createElement(Layout.Content, {
ref: resizeRef,
refreshDelay: resizeConfig.refreshDelay,
className: "".concat(prefixCls, "_layout_content")
}, function (size) {
return /*#__PURE__*/React.createElement(ErrorBoundaryFallback, {
fallback: ErrorBoundary
}, /*#__PURE__*/React.createElement(Table, _extends({}, size, {
instance: props,
resizeRef: resizeRef
})));
}));
};
export default Wrapper;