File size: 533 Bytes
b9fe2b4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
26
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;