import { createFromIconfontCN } from '@ant-design/icons'

const IconEle = createFromIconfontCN({
  // 该地址为iconfont中的项目地址，根据实际进行修改
  scriptUrl: '//at.alicdn.com/t/font_2794551_586f2xpreyu.js'
});

const IconFont = ({ name, style , size, className}: { name: string, style?: any ,size: string|number,className?: any}) => {
    // const newStyle = size ? { ...{ fontSize: `${size}px`,lineHeight:`${size}px`  }, ...style } : {...style}
    return <IconEle type={name} style={{...style, fontSize: `${size}px`}} className={className}/>
}

export default IconFont;
