@wufengteam/icons
TypeScript icon, indicating that this package has built-in type declarations

4.1.1 • Public • Published

@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';

/@wufengteam/icons/

    Package Sidebar

    Install

    npm i @wufengteam/icons

    Weekly Downloads

    164

    Version

    4.1.1

    License

    MIT

    Unpacked Size

    134 kB

    Total Files

    4

    Last publish

    Collaborators

    • taiyangteng
    • diyc
    • goulili
    • enzochan
    • hammersjs
    • lin.liangken
    • zzzzjq
    • hang1017
    • ashoka_j
    • pengyh
    • xiaohuoni