awesome-react-colorpicker

1.0.7 • Public • Published

Demo

Demo

Installation & Usage

npm install awesome-react-colorpicker --save

Import the Component

import React from 'react';
import ColorPicker from 'awesome-react-colorpicker';
import 'awesome-react-colorpicker/dist/colorpicker.min.css';

class Component extends React.Component {

  render() {
    return (
        <ColorPicker 
            color="red"
            globalColor={['red', 'rgb(200, 100, 100)']}
            onChange={this.handleChange}
            addGlobalColor={this.handleAddGlobalColor}
        />
    ) 
  }
}

proptypes

* color
* globalColor
* onChange
* addGlobalColor

color

  • string

globalColor

  • Array<string>

onChange

  • function
  • params ( color: string )

addGlobalColor

  • function
  • params ( color: string )

Package Sidebar

Install

npm i awesome-react-colorpicker

Weekly Downloads

1

Version

1.0.7

License

none

Unpacked Size

72.8 kB

Total Files

4

Last publish

Collaborators

  • huishao