1.1.4 • Published 7 years ago
webj2ee-icons-react v1.1.4
webj2ee-icons
本项目的目的是学习、研究 ant-design 的 Icon 管理策略;
参考:ant-design-icons/icons-react v1.1.15
- 用 ES6 重写了 TypeScript 逻辑;
- 用 Promise 重写了 RxJS 异步逻辑;
- 按照自己的理解,增加了部分代码注释;
1. 安装 && 打包
安装:
npm install
打包:
npm run compile
2. 使用方式
import Webj2eeIcon from 'webj2ee-icons-react';
import { AntDesignOutline } from 'webj2ee-icons'; // 引入一个 SVG 的 IconDefinition
Webj2eeIcon.add(AntDesignOutline); // 注册 IconDefinition 到 icons-react
<AntdIcon type="ant-design-o" /> // 渲染已注册到 icons-react 中的 IconDefinition