react-radio-group
Advanced tools
Comparing version 2.0.2 to 2.1.0
@@ -0,1 +1,4 @@ | ||
### 2.1.0 (July 26th 2015) | ||
- Library now no longer wraps your children function return with a `div`. It now checks that you return a single component (or `null`) from the function. #18 | ||
### 2.0.2 (June 14th 2015) | ||
@@ -2,0 +5,0 @@ - Make the library work with browser globals. |
(function (global, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define('RadioGroup', ['exports', 'module', 'react'], factory); | ||
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { | ||
factory(exports, module, require('react')); | ||
if (typeof define === "function" && define.amd) { | ||
define("RadioGroup", ["exports", "module", "react"], factory); | ||
} else if (typeof exports !== "undefined" && typeof module !== "undefined") { | ||
factory(exports, module, require("react")); | ||
} else { | ||
@@ -14,7 +14,7 @@ var mod = { | ||
})(this, function (exports, module, _react) { | ||
'use strict'; | ||
"use strict"; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -24,6 +24,6 @@ var _React = _interopRequireDefault(_react); | ||
function radio(name, selectedValue, onChange) { | ||
return _React['default'].createClass({ | ||
return _React["default"].createClass({ | ||
render: function render() { | ||
return _React['default'].createElement('input', _extends({}, this.props, { | ||
type: 'radio', | ||
return _React["default"].createElement("input", _extends({}, this.props, { | ||
type: "radio", | ||
name: name, | ||
@@ -36,4 +36,4 @@ checked: this.props.value === selectedValue, | ||
module.exports = _React['default'].createClass({ | ||
displayName: 'index', | ||
module.exports = _React["default"].createClass({ | ||
displayName: "index", | ||
@@ -44,3 +44,3 @@ propTypes: { | ||
onChange: _react.PropTypes.func, | ||
children: _react.PropTypes.func | ||
children: _react.PropTypes.func.isRequired | ||
}, | ||
@@ -55,9 +55,6 @@ | ||
return _React['default'].createElement( | ||
'div', | ||
null, | ||
children && children(radio(name, selectedValue, onChange)) | ||
); | ||
var renderedChildren = children(radio(name, selectedValue, onChange)); | ||
return renderedChildren && _React["default"].Children.only(renderedChildren); | ||
} | ||
}); | ||
}); |
{ | ||
"name": "react-radio-group", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "Better radio buttons.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7410
66