@alilc/lowcode-editor-skeleton
Version:
alibaba lowcode editor skeleton
41 lines • 1.39 kB
JavaScript
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
var _class, _class2;
import { Component, Fragment } from 'react';
import classNames from 'classnames';
import { observer } from '@alilc/lowcode-editor-core';
var BottomArea = observer(_class2 = /*#__PURE__*/function (_Component2) {
function BottomArea() {
return _Component2.apply(this, arguments) || this;
}
_inheritsLoose(BottomArea, _Component2);
var _proto2 = BottomArea.prototype;
_proto2.render = function render() {
var area = this.props.area;
if (area.isEmpty()) {
return null;
}
return /*#__PURE__*/React.createElement("div", {
className: classNames('lc-bottom-area', {
'lc-area-visible': area.visible
})
}, /*#__PURE__*/React.createElement(Contents, {
area: area
}));
};
return BottomArea;
}(Component)) || _class2;
export { BottomArea as default };
var Contents = observer(_class = /*#__PURE__*/function (_Component) {
function Contents() {
return _Component.apply(this, arguments) || this;
}
_inheritsLoose(Contents, _Component);
var _proto = Contents.prototype;
_proto.render = function render() {
var area = this.props.area;
return /*#__PURE__*/React.createElement(Fragment, null, area.container.items.map(function (item) {
return item.content;
}));
};
return Contents;
}(Component)) || _class;