UNPKG

zent

Version:

一套前端设计语言和基于React的实现

26 lines (25 loc) 1.04 kB
import { __assign, __extends, __rest } from "tslib"; import { jsx as _jsx } from "react/jsx-runtime"; import { PureComponent } from 'react'; import cx from 'classnames'; import Base from './Base'; var Rectangle = (function (_super) { __extends(Rectangle, _super); function Rectangle() { return _super !== null && _super.apply(this, arguments) || this; } Rectangle.prototype.render = function () { var _a = this.props, className = _a.className, width = _a.width, height = _a.height, style = _a.style, passThrough = __rest(_a, ["className", "width", "height", "style"]); var classes = cx('zent-placeholder-rectangle', className); var mergedStyle = __assign({ minWidth: width, height: height }, style); return _jsx(Base, __assign({ className: classes, style: mergedStyle }, passThrough), void 0); }; Rectangle.defaultProps = { style: {}, animate: true, width: 80, height: 80, }; return Rectangle; }(PureComponent)); export default Rectangle;