mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
27 lines
970 B
TypeScript
27 lines
970 B
TypeScript
import {
|
|
type DomIconProps,
|
|
IconGraphCollapse,
|
|
IconGraphExpand,
|
|
IconGraphInputs,
|
|
IconGraphOutputs,
|
|
IconSettings
|
|
} from '@/components/Icons';
|
|
|
|
import { DependencyMode } from '../stores/cstSearch';
|
|
|
|
/** Icon for term graph dependency mode. */
|
|
export function IconDependencyMode({ value, size = '1.25rem', className }: DomIconProps<DependencyMode>) {
|
|
switch (value) {
|
|
case DependencyMode.ALL:
|
|
return <IconSettings size={size} className={className} />;
|
|
case DependencyMode.OUTPUTS:
|
|
return <IconGraphOutputs size={size} className={className ?? 'text-sec-600'} />;
|
|
case DependencyMode.INPUTS:
|
|
return <IconGraphInputs size={size} className={className ?? 'text-sec-600'} />;
|
|
case DependencyMode.EXPAND_OUTPUTS:
|
|
return <IconGraphExpand size={size} className={className ?? 'text-sec-600'} />;
|
|
case DependencyMode.EXPAND_INPUTS:
|
|
return <IconGraphCollapse size={size} className={className ?? 'text-sec-600'} />;
|
|
}
|
|
}
|