ant-design/components/icon/demo/iconfont.md
afc163 80e7cc0afd
fix: <Icon component={HomeOutlined} /> align issue (#33709)
* fix: <Icon component={HomeOutlined} /> align issue

close #33703

* update snapshot
2022-01-13 20:32:09 +08:00

765 B

order title
3
zh-CN en-US
使用 iconfont.cn Use iconfont.cn

zh-CN

对于使用 iconfont.cn 的用户,通过设置 createFromIconfontCN 方法参数对象中的 scriptUrl 字段, 即可轻松地使用已有项目中的图标。

en-US

If you are using iconfont.cn, you can use the icons in your project gracefully.

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

const IconFont = createFromIconfontCN({
  scriptUrl: '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js',
});

ReactDOM.render(
  <Space>
    <IconFont type="icon-tuichu" />
    <IconFont type="icon-facebook" />
    <IconFont type="icon-twitter" />
  </Space>,
  mountNode,
);