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

rc-color-picker

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-color-picker - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

13

lib/ColorPicker.js

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

5

lib/Preview.js

@@ -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",

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