hrw-certificate-editor
Version:
Design Editor Tools with React.js + ant.design + fabric.js
55 lines • 2.26 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const React = __importStar(require("react"));
const PropTypes = __importStar(require("prop-types"));
const antd_1 = require("antd");
class Content extends React.Component {
render() {
const { title, leftSider, content, rightSider, className, loading, children } = this.props;
return (React.createElement(antd_1.Spin, { spinning: loading },
React.createElement(antd_1.Layout, { className: "rde-content-layout" },
title,
React.createElement(antd_1.Layout, { style: {
overflowY: 'auto',
overflowX: 'hidden',
minHeight: `calc(100vh - ${title ? 98 : 60}px)`,
height: `calc(100vh - ${title ? 98 : 60}px)`,
}, className: className },
leftSider,
content || children,
rightSider))));
}
}
Content.propTypes = {
title: PropTypes.any,
leftSider: PropTypes.any,
content: PropTypes.any,
rightSider: PropTypes.any,
className: PropTypes.string,
loading: PropTypes.bool,
};
Content.defaultProps = {
className: 'rde-content-layout-main',
loading: false,
};
exports.default = Content;
//# sourceMappingURL=Content.js.map