1 | import _extends from 'babel-runtime/helpers/extends';
|
2 | import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
|
3 | import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
|
4 | import _inherits from 'babel-runtime/helpers/inherits';
|
5 | import React from 'react';
|
6 | import PropTypes from 'prop-types';
|
7 |
|
8 | export default function withContext(Checkbox) {
|
9 | var _class, _temp;
|
10 |
|
11 | return _temp = _class = function (_React$Component) {
|
12 | _inherits(WrappedComp, _React$Component);
|
13 |
|
14 | function WrappedComp() {
|
15 | _classCallCheck(this, WrappedComp);
|
16 |
|
17 | return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
|
18 | }
|
19 |
|
20 | WrappedComp.prototype.render = function render() {
|
21 | return React.createElement(Checkbox, _extends({}, this.props, { context: this.context }));
|
22 | };
|
23 |
|
24 | return WrappedComp;
|
25 | }(React.Component), _class.displayName = 'Checkbox', _class.contextTypes = {
|
26 | onChange: PropTypes.func,
|
27 | __group__: PropTypes.bool,
|
28 | selectedValue: PropTypes.array,
|
29 | disabled: PropTypes.bool,
|
30 | prefix: PropTypes.string
|
31 | }, _temp;
|
32 | } |
\ | No newline at end of file |