UNPKG

@jdcfe/yep-react

Version:

一套移动端的React组件库

53 lines (43 loc) 2.33 kB
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; import _createClass from "@babel/runtime/helpers/createClass"; import _inherits from "@babel/runtime/helpers/inherits"; import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } import * as React from 'react'; import classNames from 'classnames'; import noop from '../_utils/noop'; var HorizontalWhiteSpace = /*#__PURE__*/function (_React$PureComponent) { _inherits(HorizontalWhiteSpace, _React$PureComponent); var _super = _createSuper(HorizontalWhiteSpace); function HorizontalWhiteSpace() { _classCallCheck(this, HorizontalWhiteSpace); return _super.apply(this, arguments); } _createClass(HorizontalWhiteSpace, [{ key: "render", value: function render() { var _this$props = this.props, prefixCls = _this$props.prefixCls, size = _this$props.size, className = _this$props.className, style = _this$props.style, onClick = _this$props.onClick; var wrapCls = classNames(prefixCls, "".concat(prefixCls, "-").concat(size), className); return /*#__PURE__*/React.createElement("div", { className: wrapCls, style: style, onClick: onClick }); } }]); return HorizontalWhiteSpace; }(React.PureComponent); export { HorizontalWhiteSpace as default }; HorizontalWhiteSpace.defaultProps = { prefixCls: 'Yep-whitespace-horizontal', style: {}, size: 'md', onClick: noop };