ragflow/web/src/pages/flow/operator-icon/index.tsx
balibabu 013db9410f
feat: modify DuckDuckGo's style #918 (#1485)
### What problem does this PR solve?

feat: modify DuckDuckGo's style #918
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2024-07-12 15:04:45 +08:00

19 lines
444 B
TypeScript

import React from 'react';
import { Operator, operatorIconMap } from '../constant';
import styles from './index.less';
interface IProps {
name: Operator;
fontSize?: number;
width?: number;
}
const OperatorIcon = ({ name, fontSize, width }: IProps) => {
const Icon = operatorIconMap[name] || React.Fragment;
return (
<Icon className={styles.icon} style={{ fontSize }} width={width}></Icon>
);
};
export default OperatorIcon;