svg-to-component-parse
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

中文 | English

npm

SVG代码转React组件代码。

安装

NPM

npm add svg-to-component-parse

使用

  • SVG代码转React组件代码
import { generateReact } from 'svg-to-component-parse';

const result = generateReact('YourComponentName', '<svg>...your svg code</svg>');
  • 获取React组件代码的helper包

React组件代码中引用了helper、utils模块,本方法提供了这些模块的代码和相对路径。

import { generateComponentUtils } from 'svg-to-component-parse';

const result = generateComponentUtils();

Readme

Keywords

none

Package Sidebar

Install

npm i svg-to-component-parse

Weekly Downloads

2

Version

1.1.2

License

none

Unpacked Size

13.8 kB

Total Files

20

Last publish

Collaborators

  • taoliujun