Skip to content

olragon/svg-to-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVG to React API

  1. Play with react-svgr.com/playground

  2. Get config params

  3. Call SVG to React API

  4. Done:

    import * as React from 'react'
    import Svg, { SvgProps, Circle } from 'react-native-svg'
    
    function SvgComponent(props: SvgProps) {
      return (
        <Svg height="1em" width="1em" {...props}>
          <Circle cx={50} cy={50} r={40} stroke="#000" strokeWidth={3} fill="red" />
        </Svg>
      )
    }
    
    export default SvgComponent

SVG to React API

About

HTTP API to create React code from SVG based on gregberge/svgr

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published