import { X } from 'lucide-react'; import { useTranslation } from 'react-i18next'; interface Props { onClear: () => void; /** Parent filter chip uses accent background (`btn-sort-active`). */ onActiveChip?: boolean; } /** Inline dismiss control on toolbar filter buttons (does not open the filter popover). */ export default function FilterQuickClear({ onClear, onActiveChip = false }: Props) { const { t } = useTranslation(); const activate = (e: React.SyntheticEvent) => { e.stopPropagation(); e.preventDefault(); onClear(); }; return ( { if (e.key === 'Enter' || e.key === ' ') activate(e); }} > ); }