import React from 'react' import enhanceWithClickOutside from 'react-click-outside' import { TwitterPicker } from 'react-color' import WindowPointer from './WindowPointer' import { PALETTE } from '../lib/constants' class ColorPicker extends React.Component { constructor() { super() this.state = { isVisible: false } 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.props.onChange(color.hex) } render() { return (