File size: 499 Bytes
454aa85 b25a0c6 4138aee 454aa85 4138aee 454aa85 b25a0c6 4138aee b25a0c6 454aa85 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import React from 'react';
import { Operator, operatorIconMap } from '../constant';
import styles from './index.less';
interface IProps {
name: Operator;
fontSize?: number;
width?: number;
color?: string;
}
const OperatorIcon = ({ name, fontSize, width, color }: IProps) => {
const Icon = operatorIconMap[name] || React.Fragment;
return (
<Icon
className={styles.icon}
style={{ fontSize, color }}
width={width}
></Icon>
);
};
export default OperatorIcon;
|