import React from 'react'; import Icon from '../Icon'; import Typography from '../Typography'; import { Group, Item, Circle } from '../../global/toolStyled'; import data from './data'; type Props = { showTitle?: boolean; color?: string; onClick: (color: string) => void; }; const ColorSelector: React.FunctionComponent = ({ showTitle = false, color = '', onClick, }: Props) => ( <> { showTitle ? Color : null} {data.map(ele => ( { onClick(ele.color); }} > ))} ); export default ColorSelector;