Package Exports
- react-simple-colorpicker
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-simple-colorpicker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React-Simple-ColorPicker
A simple(r) colorpicker written using React.
A fork of react-colorpicker, but with the extra stuff removed.
Install
npm install react-simple-colorpicker --saveUsage
var React = require('react');
var ColorPicker = require('react-simple-colorpicker');
var App = React.createClass({
getInitialState: function() {
return {
color : this.props.initialColor
};
},
render: function() {
return (
<ColorPicker color={this.state.color} onChange={this.handleChange} opacitySlider={true} />
);
},
handleChange : function(color) {
console.log(color); // color is rgb(a) string
this.setState({ color : color });
}
});
React.render(<App initialColor="rgb(0,0,0,1)" />, document.body);