ConceptPortal-public/rsconcept/frontend/src/features/rsform/components/icon-cst-match-mode.tsx

20 lines
858 B
TypeScript
Raw Normal View History

2025-03-12 12:04:50 +03:00
import { type DomIconProps, IconAlias, IconFilter, IconFormula, IconTerm, IconText } from '@/components/icons';
2025-02-26 00:16:41 +03:00
2025-03-12 11:55:43 +03:00
import { CstMatchMode } from '../stores/cst-search';
2025-02-26 00:16:41 +03:00
/** Icon for constituenta match mode. */
export function IconCstMatchMode({ value, size = '1.25rem', className }: DomIconProps<CstMatchMode>) {
switch (value) {
case CstMatchMode.ALL:
return <IconFilter size={size} className={className} />;
case CstMatchMode.TEXT:
return <IconText size={size} className={className ?? 'text-sec-600'} />;
case CstMatchMode.EXPR:
return <IconFormula size={size} className={className ?? 'text-sec-600'} />;
case CstMatchMode.TERM:
return <IconTerm size={size} className={className ?? 'text-sec-600'} />;
case CstMatchMode.NAME:
return <IconAlias size={size} className={className ?? 'text-sec-600'} />;
}
}