Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 1.29 KB

README.md

File metadata and controls

30 lines (25 loc) · 1.29 KB

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