1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 |
|
7 | var _react = require('react');
|
8 |
|
9 | var _react2 = _interopRequireDefault(_react);
|
10 |
|
11 | var _Radio = require('./Radio');
|
12 |
|
13 | var _Radio2 = _interopRequireDefault(_Radio);
|
14 |
|
15 | var _propTypes = require('prop-types');
|
16 |
|
17 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
18 |
|
19 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
20 |
|
21 | function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
22 |
|
23 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
24 |
|
25 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
26 |
|
27 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
|
28 |
|
29 | var propTypes = {
|
30 | value: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].number]),
|
31 | style: _propTypes2["default"].object
|
32 | };
|
33 | var defaultProps = {
|
34 | clsPrefix: "u-radio-button"
|
35 | };
|
36 |
|
37 | var RadioButton = function (_Component) {
|
38 | _inherits(RadioButton, _Component);
|
39 |
|
40 | function RadioButton() {
|
41 | _classCallCheck(this, RadioButton);
|
42 |
|
43 | return _possibleConstructorReturn(this, _Component.apply(this, arguments));
|
44 | }
|
45 |
|
46 | RadioButton.prototype.render = function render() {
|
47 | return _react2["default"].createElement(_Radio2["default"], this.props);
|
48 | };
|
49 |
|
50 | return RadioButton;
|
51 | }(_react.Component);
|
52 |
|
53 | RadioButton.propTypes = propTypes;
|
54 | RadioButton.defaultProps = defaultProps;
|
55 | exports["default"] = RadioButton;
|
56 | module.exports = exports['default']; |
\ | No newline at end of file |