// @flow
import React from 'react';
import { Box, Span } from '../../src';

type CustomColorPickerProps = {
  label: string,
  onColorChange: string => void,
  value: string,
};
export const CustomColorPicker = ({
  label,
  onColorChange,
  value,
}: CustomColorPickerProps) => {
  return (
    <Box stacking="row">
      <input
        type="color"
        onChange={e => onColorChange(e.target.value)}
        value={value}
      />
      <Span> {label}</Span>
    </Box>
  );
};
