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

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