Skip to content

Conversation

@albinotonnina
Copy link

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 albinotonnina force-pushed the stateful-component branch 4 times, most recently from 4ab68c6 to 5d592fd Compare December 15, 2017 13:17
@ljharb ljharb force-pushed the stateful-component branch from 5d592fd to 12a9300 Compare May 18, 2018 05:14
@ljharb ljharb marked this pull request as draft December 14, 2023 22:03
@ljharb
Copy link
Collaborator

ljharb commented Dec 14, 2023

This will need a rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pass refs to the svg element

2 participants