UNPKG

@jdcfe/yep-react

Version:

一套移动端的React组件库

69 lines (55 loc) 2.78 kB
import _extends from "@babel/runtime/helpers/extends"; 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; } } var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; import * as React from 'react'; import classNames from 'classnames'; import CellItem, { Brief } from './CellItem'; var Cell = /*#__PURE__*/function (_React$PureComponent) { _inherits(Cell, _React$PureComponent); var _super = _createSuper(Cell); function Cell(props) { _classCallCheck(this, Cell); return _super.call(this, props); } _createClass(Cell, [{ key: "render", value: function render() { var _a = this.props, prefixCls = _a.prefixCls, children = _a.children, className = _a.className, style = _a.style, renderHeader = _a.renderHeader, renderFooter = _a.renderFooter, restProps = __rest(_a, ["prefixCls", "children", "className", "style", "renderHeader", "renderFooter"]); var wrapCls = classNames(prefixCls, className); return /*#__PURE__*/React.createElement("div", _extends({ className: wrapCls, style: style }, restProps), children); } }]); return Cell; }(React.PureComponent); export { Cell as default }; Cell.Item = CellItem; Cell.Brief = Brief; Cell.defaultProps = { prefixCls: 'Yep-cell', style: {} };