1.0.1 • Published 3 years ago

mooli-icons v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

mooli-icons 移动端 react 图标库

Getting Started

下载依赖,

npm i

启动本地开发服务,

npm start

生成所有的 icons 文件以及入口 index.ts,

npm run icons

注:默认程序会自动读取 mooli-svg 所有 svg 文件并生成对应的 ts 文件,如果需要自定义 icon 组件。可以将一下模版复制进去,修改对应的 svg 引入即可:

import { 组件名称 } from 'mooli-svg';
import { IconContainer, IconProps } from '@/components/Container';
import { StyleMergedComponent } from '@/components/StyleMergedComponent';

export const Icon{组件名称} = StyleMergedComponent<IconProps>({
  template: 组件名称,
})(IconContainer);

编译打包文档,

npm run docs:build

编译打包项目文件,

npm run build