New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-best-gradient-color-picker

Package Overview
Dependencies
Maintainers
1
Versions
247
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 1.4.12 to 1.4.13

12

lib/index.js
import React, { useRef, useState, useEffect } from "react";
import { useScrollPosition } from 'react-use-scroll-position';
import PickerContextWrapper from './context';

@@ -17,6 +16,2 @@ import Picker from "./Picker";

const [bounds, setBounds] = useState({});
const {
x,
y
} = useScrollPosition();
const boundingRect = contRef?.current?.getBoundingClientRect() || {};

@@ -26,10 +21,9 @@ const {

height,
left,
right,
top
x,
y
} = boundingRect;
useEffect(() => {
setBounds(contRef?.current?.getBoundingClientRect());
setTimeout(() => setBounds(contRef?.current?.getBoundingClientRect()), 150);
}, [bottom, height, left, right, top]);
}, [bottom, height, right, x, y]);
return /*#__PURE__*/React.createElement("div", {

@@ -36,0 +30,0 @@ ref: contRef

{
"name": "react-best-gradient-color-picker",
"version": "1.4.12",
"version": "1.4.13",
"description": "An easy to use color/gradient picker for React.js",

@@ -47,5 +47,4 @@ "main": "lib/index.js",

"lodash.throttle": "^4.1.1",
"tinycolor2": "^1.4.2",
"react-use-scroll-position": "^2.0.0"
"tinycolor2": "^1.4.2"
}
}
import React, { useRef, useState, useEffect } from "react"
import { useScrollPosition } from 'react-use-scroll-position';
import PickerContextWrapper from './context';

@@ -11,10 +10,8 @@ import Picker from "./Picker";

const [bounds, setBounds] = useState({});
const { x, y } = useScrollPosition();
const boundingRect = contRef?.current?.getBoundingClientRect() || {};
const { bottom, height, left, right, top } = boundingRect
const { bottom, height, right, x, y } = boundingRect
useEffect(() => {
setBounds(contRef?.current?.getBoundingClientRect())
setTimeout(() => setBounds(contRef?.current?.getBoundingClientRect()), 150)
}, [bottom, height, left, right, top])
}, [bottom, height, right, x, y])

@@ -21,0 +18,0 @@ return (

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