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

Adding className to the <i> element

Open spoldman opened this issue 7 years ago • 2 comments

What do you think about the idea of adding a className prop so if I have multiple inline svgs on the page I can style them independently. Just an idea, don't like always have to wrap it in a div.

spoldman avatar Sep 21 '16 15:09 spoldman

I can submit a PR for this if there's a chance it will get merged.

lynndylanhurley avatar Nov 30 '16 18:11 lynndylanhurley

AFAIR this should work.

<InlineSVG className="some-class" .../>

Since "otherProps" are forwarded to target element https://github.com/sairion/svg-inline-react/blob/master/lib/index.js#L94

wookieb avatar Dec 26 '16 21:12 wookieb