babel-plugin-inline-react-svg icon indicating copy to clipboard operation
babel-plugin-inline-react-svg copied to clipboard

Stateful component

Open albinotonnina opened this issue 7 years ago • 1 comments
trafficstars

Fixes #13 Can be used like this:

// .babelrc
{
  "plugins": [
    ["inline-react-svg", {
      "statefulComponent": true
    }]
  ]
}
// React
import React from 'react';
import CloseSVG from './close.svg';

const MyComponent = () => <CloseSvg svgRef={el => this.myEl = el} />;

albinotonnina avatar Dec 15 '17 13:12 albinotonnina

This will need a rebase.

ljharb avatar Dec 14 '23 22:12 ljharb