react-color
react-color copied to clipboard
Nothing work!!!!
It has only a static value, #22194D I can't change the color.
I was same situation with you. But each picker must be given color
props like following.
export class Editor extends React.Component {
state = {
color: '#ffffff',
};
public render(): ReactNode {
return (
<SketchPicker
color={this.state.color}
onChangeComplete={(v) => this.handleChangeComplete(v)}
/>
);
}
private handleChangeComplete(color: ColorResult) {
this.setState({
color: color.hex,
});
}
}
I wish this comment is useful for other developers who is under the same issue :pray:
use this version, lastest version has bugs; "react-color": "2.17.1",