【文件属性】:
文件名称:svg-to-react:将SVG文件转换为React组件的工具
文件大小:216KB
文件格式:ZIP
更新时间:2021-02-16 11:55:53
TypeScript
将SVG文件转换为React组件的工具
安装
npm install -g @cpmech/svg-to-react
用法
$ svg-to-react
输出示例
SvgSync.tsx
export interface SvgSyncProps {
size ?: string ; // size of square container
style ?: React . CSSProperties ; // not for height or width
}
export const SvgSync : React . FC < SvgSyncProps> = ( { size = '24px' , style } ) => {
return (
< div
style = { {
display : 'inline-flex' ,