import React from 'react' import { t } from 'ttag' import { connect } from 'react-redux' import ColorPicker from './ColorPicker' import { toggleCustomLayer, removeCustomLayer, setCustomColor } from '../actions/customLayers' import { CustomLayer, customLayerColors } from '../reducers/customLayers' interface CustomLayerListItemProps { layer: CustomLayer onToggleCustomLayer: (id: string) => any onRemoveCustomLayer: (id: string) => any onSetCustomColor: (id: string, color: string) => any showColorPicker: boolean toggleColorPicker: (id: string) => void } const CustomLayerListItem = ({ layer, onToggleCustomLayer, onRemoveCustomLayer, onSetCustomColor, showColorPicker, toggleColorPicker, }: CustomLayerListItemProps) => { return (