react-best-gradient-color-picker
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -21,3 +21,3 @@ import React, { useState, useEffect, useRef } from 'react'; | ||
useEffect(() => { | ||
if (!disable === 'hex') { | ||
if (disable !== 'hex') { | ||
setNewHex(getHex(currentColor)); | ||
@@ -24,0 +24,0 @@ } |
{ | ||
"name": "react-best-gradient-color-picker", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "An easy to use color/gradient picker for React.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -18,3 +18,11 @@ <div align="center"> | ||
- Customizable, easy to use color and gradient picker for React.js | ||
- Simply pass in an rgba or css gradient string as value and an onChange handler | ||
- UI will default to solid or gradient based on the value string it receives | ||
- You can customize the UI by hiding the various elements and using the API functions to build your own inputs, controls, etc. | ||
<div align="center"> | ||
<img alt="" src="https://github.com/hxf31891/react-gradient-color-picker/blob/main/demo/demo.png" width="200px"/> | ||
<img alt="" src="https://github.com/hxf31891/react-gradient-color-picker/blob/main/demo/demo2.png" width="201px"/> | ||
</div> | ||
## Install | ||
@@ -40,2 +48,5 @@ `npm install react-best-gradient-color-picker` | ||
| value | `string` | 'rgba(175, 51, 242, 1)' | The starting color | | ||
| hideInputs | `boolean` | `false` | (optional) hide the hex and rgba inputs | | ||
| hidePresets | `boolean` | `false` | (optional) hide the preset color options | | ||
| hideControls | `boolean` | `false` | (optional) hide the solid/gradient and gradient options | | ||
@@ -42,0 +53,0 @@ ### API |
@@ -14,3 +14,3 @@ import React, { useState, useEffect, useRef } from 'react' | ||
useEffect(() => { | ||
if (!disable === 'hex') { | ||
if (disable !== 'hex') { | ||
setNewHex(getHex(currentColor)) | ||
@@ -17,0 +17,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1353970
1748
60