react-radio-group
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -0,1 +1,4 @@ | ||
### 2.0.2 (June 14th 2015) | ||
- Make the library work with browser globals. | ||
### 2.0.1 (June 14th 2015) | ||
@@ -2,0 +5,0 @@ - Compile to UMD so you can import this hackily from a browser script. |
(function (global, factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['exports'], factory); | ||
} else if (typeof exports !== 'undefined') { | ||
factory(exports); | ||
define('RadioGroup', ['exports', 'module', 'react'], factory); | ||
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { | ||
factory(exports, module, require('react')); | ||
} else { | ||
@@ -10,6 +10,6 @@ var mod = { | ||
}; | ||
factory(mod.exports); | ||
global.index = mod.exports; | ||
factory(mod.exports, mod, global.React); | ||
global.RadioGroup = mod.exports; | ||
} | ||
})(this, function (exports) { | ||
})(this, function (exports, module, _react) { | ||
'use strict'; | ||
@@ -19,9 +19,10 @@ | ||
var React = require('react'); | ||
var p = React.PropTypes; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
var _React = _interopRequireDefault(_react); | ||
function radio(name, selectedValue, onChange) { | ||
return React.createClass({ | ||
return _React['default'].createClass({ | ||
render: function render() { | ||
return React.createElement('input', _extends({}, this.props, { | ||
return _React['default'].createElement('input', _extends({}, this.props, { | ||
type: 'radio', | ||
@@ -35,10 +36,10 @@ name: name, | ||
var RadioGroup = React.createClass({ | ||
displayName: 'RadioGroup', | ||
module.exports = _React['default'].createClass({ | ||
displayName: 'index', | ||
propTypes: { | ||
name: p.string, | ||
selectedValue: p.oneOfType([p.string, p.number]), | ||
onChange: p.func, | ||
children: p.func | ||
name: _react.PropTypes.string, | ||
selectedValue: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]), | ||
onChange: _react.PropTypes.func, | ||
children: _react.PropTypes.func | ||
}, | ||
@@ -53,3 +54,3 @@ | ||
return React.createElement( | ||
return _React['default'].createElement( | ||
'div', | ||
@@ -61,4 +62,2 @@ null, | ||
}); | ||
module.exports = RadioGroup; | ||
}); |
{ | ||
"name": "react-radio-group", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Better radio buttons.", | ||
"main": "index.js", | ||
"scripts": { | ||
"example": "npm run build && webpack -d", | ||
"build": "babel index.jsx --out-dir=lib --modules umd", | ||
"example": "webpack -w -d", | ||
"build": "babel index.jsx --out-dir=lib --modules umd --module-id RadioGroup", | ||
"prerelease": "npm run build" | ||
@@ -10,0 +10,0 @@ }, |
@@ -7,3 +7,3 @@ # [React](http://facebook.github.io/react/)-radio-group | ||
Then either `require('react-radio-group')` or add `node_modules/react-radio-group/lib/index.js` into your HTML file. | ||
Then either `require('react-radio-group')` or add `node_modules/react-radio-group/lib/index.js` into your HTML file (exports the `RadioGroup` global). | ||
@@ -10,0 +10,0 @@ ## What This Solves |
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
7203
69