@jworkshop/colorpicker
v0.0.5
Published
A color picker react UI component.
Downloads
2
Readme
colorpicker
A color picker react UI component.
install
Usage
import React, { Component } from "react";
import ReactDOM from "react-dom";
import ColorPicker from "@jworkshop/colorpicker";
import "./style.css";
class Example extends Component {
constructor(props) {
super(props);
this.state = {
color: { r: 125, g: 125, b: 125, a: 1 }
};
}
render() {
const { color } = this.state;
return (
<ColorPicker
className="example"
style: { ... },
paletteClassName="paletteClassName"
paletteStyle: { ... },
dialogWidth={200}
dialogHeight={190}
color={color}
onChange={value => this.setState({ color: value })}
/>
);
}
}
ReactDOM.render(<Test />, document.getElementById("root"));