Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stateful component #36

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

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 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