import React, { useEffect } from 'react' import { BlockPicker } from 'react-color' interface Props { value?: string onChange?: (value: string) => void } export const InputColor: React.FC = (props) => { useEffect(() => { if (!props.value) { props.onChange('#FFF') } }, [props.value]) return ( props.onChange(e.hex)} styles={{ default: { card: { flexDirection: 'row', display: 'flex', boxShadow: 'none', }, head: { flex: 1, borderRadius: 6, height: 'auto', }, }, }} /> ) }