You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.tsx 503B

12345678910111213141516171819202122
  1. import React from 'react';
  2. import { Operator, operatorIconMap } from '../constant';
  3. interface IProps {
  4. name: Operator;
  5. fontSize?: number;
  6. width?: number;
  7. color?: string;
  8. }
  9. const OperatorIcon = ({ name, fontSize, width, color }: IProps) => {
  10. const Icon = operatorIconMap[name] || React.Fragment;
  11. return (
  12. <Icon
  13. className={'text-2xl max-h-6 max-w-6 text-[rgb(59, 118, 244)]'}
  14. style={{ fontSize, color }}
  15. width={width}
  16. ></Icon>
  17. );
  18. };
  19. export default OperatorIcon;