rc-color-picker
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -39,2 +39,8 @@ 'use strict'; | ||
var _colr = require('colr'); | ||
var _colr2 = _interopRequireDefault(_colr); | ||
var colr = new _colr2['default'](); | ||
function refFn(field, component) { | ||
@@ -200,2 +206,6 @@ this[field] = component; | ||
var RGBA = colr.fromHex(this.state.color).toRgbArray(); | ||
RGBA.push(this.state.alpha / 100); | ||
if (children) { | ||
@@ -206,4 +216,3 @@ children = _react2['default'].cloneElement(children, { | ||
style: { | ||
opacity: this.state.alpha / 100, | ||
backgroundColor: this.state.color | ||
backgroundColor: 'rgba(' + RGBA.join(',') + ')' | ||
}, | ||
@@ -210,0 +219,0 @@ onClick: this.onTriggerClick, |
@@ -57,3 +57,6 @@ 'use strict'; | ||
{ className: prefixCls }, | ||
_react2['default'].createElement('span', { style: { backgroundColor: hex, opacity: this.props.alpha / 100 } }), | ||
_react2['default'].createElement('span', { style: { | ||
backgroundColor: hex, | ||
opacity: this.props.alpha / 100 } | ||
}), | ||
_react2['default'].createElement('input', { | ||
@@ -60,0 +63,0 @@ type: 'color', |
{ | ||
"name": "rc-color-picker", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "color-picker ui component for react", | ||
@@ -5,0 +5,0 @@ "main": "lib/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
73638
1800