Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-radio-group

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-radio-group - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

3

HISTORY.md

@@ -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.

31

lib/index.js
(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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc