react-best-gradient-color-picker
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -24,4 +24,3 @@ import React, { createContext, useContext, useState, useEffect } from 'react'; | ||
const [selectedColor, setSelectedColor] = useState(0); | ||
const initials = getInitialValues(colors, selectedColor); // const [color, setColor] = useState(initials?.c) | ||
const initials = getInitialValues(colors, selectedColor); | ||
const [hue, setHue] = useState(initials?.h); | ||
@@ -87,3 +86,3 @@ const [hueX, setHueX] = useState(initials?.hx); | ||
setSelectedColor(index); | ||
setColor(newS?.value); | ||
onChange(newS?.value); | ||
setHue(newS?.hsl[0]); | ||
@@ -90,0 +89,0 @@ setHueX(computeHueX(newS.hsl[0])); |
{ | ||
"name": "react-best-gradient-color-picker", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "An easy to use color/gradient picker for React.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -18,3 +18,2 @@ import React, { createContext, useContext, useState, useEffect } from 'react'; | ||
const initials = getInitialValues(colors, selectedColor) | ||
// const [color, setColor] = useState(initials?.c) | ||
const [hue, setHue] = useState(initials?.h) | ||
@@ -75,3 +74,3 @@ const [hueX, setHueX] = useState(initials?.hx) | ||
setSelectedColor(index); | ||
setColor(newS?.value) | ||
onChange(newS?.value) | ||
setHue(newS?.hsl[0]) | ||
@@ -78,0 +77,0 @@ setHueX(computeHueX(newS.hsl[0])) |
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
41719
1225