import { Operator, operatorIconMap } from './constant'; interface IProps { name: Operator; fontSize?: number; width?: number; color?: string; } const Empty = () => { return
; }; const OperatorIcon = ({ name, fontSize, width, color }: IProps) => { const Icon = operatorIconMap[name] || Empty; return ( ); }; export default OperatorIcon;