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 1.2.2 to 1.2.3

2

lib/Inputs.js

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

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