import type { FeatureMeta } from '../../types'; import { EyeIcon, InfoIcon, PlusIcon, CloseIcon } from './icons'; import { IconButton } from './IconButton'; interface FeatureActionsProps { feature: FeatureMeta; isPinned: boolean; onTogglePin: (name: string) => void; onShowInfo?: (feature: FeatureMeta) => void; onRemove?: (name: string) => void; onAdd?: (name: string) => void; } export function FeatureActions({ feature, isPinned, onTogglePin, onShowInfo, onRemove, onAdd, }: FeatureActionsProps) { return (
{feature.detail && onShowInfo && ( onShowInfo(feature)} title="Feature info" size="md"> )} onTogglePin(feature.name)} title={isPinned ? 'Unpin colour view' : 'Colour map by this feature'} active={isPinned} size="md" > {onAdd && ( )} {onRemove && ( onRemove(feature.name)} title="Remove filter"> )}
); }