mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 06:46:40 +08:00
### What problem does this PR solve? Feat: Combine Select and LlmSettingFieldItems into LLMSelect. #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
26 lines
533 B
TypeScript
26 lines
533 B
TypeScript
import { Operator, operatorIconMap } from './constant';
|
|
|
|
interface IProps {
|
|
name: Operator;
|
|
fontSize?: number;
|
|
width?: number;
|
|
color?: string;
|
|
}
|
|
|
|
const Empty = () => {
|
|
return <div className="hidden"></div>;
|
|
};
|
|
|
|
const OperatorIcon = ({ name, fontSize, width, color }: IProps) => {
|
|
const Icon = operatorIconMap[name] || Empty;
|
|
return (
|
|
<Icon
|
|
className={'text-2xl max-h-6 max-w-6 text-[rgb(59, 118, 244)]'}
|
|
style={{ fontSize, color }}
|
|
width={width}
|
|
></Icon>
|
|
);
|
|
};
|
|
|
|
export default OperatorIcon;
|