mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
20 lines
857 B
TypeScript
20 lines
857 B
TypeScript
import { type DomIconProps, IconAlias, IconFilter, IconFormula, IconTerm, IconText } from '@/components/Icons';
|
|
|
|
import { CstMatchMode } from '../stores/cstSearch';
|
|
|
|
/** 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'} />;
|
|
}
|
|
}
|