import React from 'react';

type IconType = {
  icon: string;
  className?: string;
  style?: React.CSSProperties;
  onClick?: (e: React.MouseEvent) => void;
};

const IconFont: React.FC<IconType> = ({ icon, className, style, onClick }) => {
  return (
    <span className="anticon align-text-bottom">
      <i className={`iconfont ${icon} ${className ?? ''}`} style={style as any} onClick={onClick} />
    </span>
  );
};

export default IconFont;
