import React from 'react' import enhanceWithClickOutside from 'react-click-outside' import { BlockPicker } from 'react-color' class ColorPicker extends React.Component { constructor() { super() this.state = { isVisible: false, bgcolor: '#565656' } this.toggle = this.toggle.bind(this) this.handlePickColor = this.handlePickColor.bind(this) } toggle() { this.setState({ isVisible: !this.state.isVisible }) } handleClickOutside() { this.setState({ isVisible: false }); } handlePickColor(color) { this.setState({ bgcolor: color.hex }) } render() { return (