Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@wufengteam/icons

lin.liangken301MIT4.1.1TypeScript support: included

@wufengteam/icons

wufengteam, alita

readme

@wufengteam/icons

安装

yarn add @wufengteam/icons

使用

import { Copy } from '@wufengteam/icons'; 

<Copy size="24px" color="#xxxx" style={{}} className=""/>

自定义

import { createReactComponent } from '@wufengteam/icons';
import amountsPng from './assets/amounts.png';
// 或者 const amountsPng = 'http:///sss.png';

const Amounts = createReactComponent<HTMLImageElement, HTMLImageElement>(
  'amounts',amountsPng
);

<Amounts size="24px" color="#xxxx" style={{}} className=""/>

@wufengteam/icons 开发指引

将需要被转换成组件的图片文件放到 src/assets 目录下,然后执行 generate:main 命令会自动生成需要的组件,组件名称以文件名首字母大写导出,如在 src/assets 目录中放入图片 hello.png ,将会自动生成 import { Hello } from '@wufengteam/icons';