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

react-best-gradient-color-picker

Package Overview
Dependencies
Maintainers
1
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-best-gradient-color-picker - npm Package Compare versions

Comparing version 3.0.10-beta.9 to 3.0.10-beta.10

7

dist/cjs/components/EyeDropper.js

@@ -62,2 +62,3 @@ "use strict";

const [coverUp, setCoverUp] = (0, react_1.useState)(false);
const [isPicking, setIsPicking] = (0, react_1.useState)(false);
const takePick = () => {

@@ -87,5 +88,7 @@ const root = document.getElementById('root');

}
setIsPicking(false);
setCoverUp(false);
};
const getEyeDrop = () => {
setIsPicking(true);
// @ts-expect-error - ts does not evaluate for window.EyeDropper

@@ -105,5 +108,7 @@ if (!window.EyeDropper) {

onSelect(`rgba(${r}, ${g}, ${b}, 1)`);
setIsPicking(false);
})
.catch((e) => {
console.log(e);
setIsPicking(false);
});

@@ -117,3 +122,3 @@ }

} },
react_1.default.createElement(DropperIcon, { color: coverUp ? 'rgb(86, 140, 245)' : '' })),
react_1.default.createElement(DropperIcon, { color: isPicking ? 'rgb(86, 140, 245)' : '' })),
coverUp && (react_1.default.createElement(Portal_js_1.default, null,

@@ -120,0 +125,0 @@ react_1.default.createElement("div", { onClick: (e) => getColorLegacy(e), style: defaultStyles.rbgcpEyedropperCover })))));

"use strict";
'use client';
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {

@@ -3,0 +4,0 @@ if (k2 === undefined) k2 = k;

@@ -34,2 +34,3 @@ /* eslint-disable react/jsx-no-leaked-render */

const [coverUp, setCoverUp] = useState(false);
const [isPicking, setIsPicking] = useState(false);
const takePick = () => {

@@ -59,5 +60,7 @@ const root = document.getElementById('root');

}
setIsPicking(false);
setCoverUp(false);
};
const getEyeDrop = () => {
setIsPicking(true);
// @ts-expect-error - ts does not evaluate for window.EyeDropper

@@ -77,5 +80,7 @@ if (!window.EyeDropper) {

onSelect(`rgba(${r}, ${g}, ${b}, 1)`);
setIsPicking(false);
})
.catch((e) => {
console.log(e);
setIsPicking(false);
});

@@ -89,3 +94,3 @@ }

} },
React.createElement(DropperIcon, { color: coverUp ? 'rgb(86, 140, 245)' : '' })),
React.createElement(DropperIcon, { color: isPicking ? 'rgb(86, 140, 245)' : '' })),
coverUp && (React.createElement(Portal, null,

@@ -92,0 +97,0 @@ React.createElement("div", { onClick: (e) => getColorLegacy(e), style: defaultStyles.rbgcpEyedropperCover })))));

@@ -0,1 +1,2 @@

'use client';
import React, { useRef } from 'react';

@@ -2,0 +3,0 @@ import PickerContextWrapper from '../context.js';

2

package.json
{
"name": "react-best-gradient-color-picker",
"version": "3.0.10-beta.9",
"version": "3.0.10-beta.10",
"description": "An easy to use color/gradient picker for React.js",

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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