hrw-certificate-editor
Version:
Design Editor Tools with React.js + ant.design + fabric.js
51 lines • 2.75 kB
JavaScript
"use strict";
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;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const React = __importStar(require("react"));
const PropTypes = __importStar(require("prop-types"));
const Icon_1 = __importDefault(require("../../components/icon/Icon"));
const flex_1 = require("../../components/flex");
class WorkflowSiderContainer extends React.Component {
render() {
const { children, title, content, icon, extra, titleStyle, contentStyle } = this.props;
return (React.createElement(flex_1.Flex, { flexDirection: "column", style: { height: '100%' } },
React.createElement(flex_1.Flex, { style: Object.assign({}, { background: '#f5f4f3', height: '40px' }, titleStyle) },
React.createElement(flex_1.Flex, { flex: "1", justifyContent: "flex-start", alignItems: "center", style: { marginLeft: '8px', color: '#4d5360' } },
React.createElement(Icon_1.default, { name: icon, style: { marginRight: 8 } }),
React.createElement("h4", { style: { marginBottom: 0 } }, title)),
extra ? (React.createElement(flex_1.Flex, { justifyContent: "flex-end", alignItems: "center" }, extra)) : null),
React.createElement(flex_1.Flex, { flexDirection: "column", style: Object.assign({}, { height: '100%', margin: '8px 16px' }, contentStyle) }, children || content)));
}
}
WorkflowSiderContainer.propTypes = {
children: PropTypes.any,
title: PropTypes.string,
icon: PropTypes.string,
content: PropTypes.any,
extra: PropTypes.any,
titleStyle: PropTypes.object,
contentStyle: PropTypes.object,
};
exports.default = WorkflowSiderContainer;
//# sourceMappingURL=WorkflowSiderContainer.js.map