aio-button
Advanced tools
Comparing version 4.1.4 to 4.2.0
15
index.js
@@ -277,3 +277,3 @@ "use strict"; | ||
onChange: function onChange(val, index) { | ||
return _onChange(!val, index); | ||
return _onChange(val, index); | ||
} | ||
@@ -455,3 +455,5 @@ })); | ||
onChange = _this$props8.onChange, | ||
rtl = _this$props8.rtl; | ||
rtl = _this$props8.rtl, | ||
_this$props8$disabled = _this$props8.disabled, | ||
disabled = _this$props8$disabled === void 0 ? false : _this$props8$disabled; | ||
return /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -463,9 +465,14 @@ className: 'r-radio-button' + (rtl ? ' rtl' : '') + (className ? ' ' + className : ''), | ||
var active = option.value === value ? ' active' : ''; | ||
var disabledClass = disabled ? ' disabled' : ''; | ||
return /*#__PURE__*/_react.default.createElement(_react.Fragment, { | ||
key: i | ||
}, /*#__PURE__*/_react.default.createElement("div", { | ||
className: 'r-radio-button-option' + active, | ||
className: 'r-radio-button-option' + active + disabledClass, | ||
title: option.title, | ||
onClick: function onClick() { | ||
return onChange(option.value, i); | ||
if (disabled) { | ||
return; | ||
} | ||
onChange(option.value, i); | ||
}, | ||
@@ -472,0 +479,0 @@ style: _this2.getOptionStyle(option.style) |
{ | ||
"name": "aio-button", | ||
"version": "4.1.4", | ||
"version": "4.2.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
58539
1648