gilbarbara/react-inlinesvg

remove "isvg loaded" from list of classes on wrapper

bologer opened this issue · 4 comments

Expected behavior

Ability to overwrite isvg loaded classes on the wrapper

Actual behavior

<SVG src={selectFileSvg}
                     wrapper={React.createFactory('div')}
                     preloader={false}
                     className="test test-2"
                />
<div class="isvg loaded test test-2">...</div>

Steps to reproduce the problem

<SVG src={selectFileSvg}
                     wrapper={React.createFactory('div')}
                     preloader={false}
                     className="test test-2"
                />

React version

16.4.2

React-Tooltips version

Error stack

The loaded class is an indicator that the file was successfully fetched.

The loaded fail/success situation can also be handled via the onError callback. In some project that was planning to use this, the hardcoded loaded classname, being too generic, applies unwanted css styles, and the lack of ability to suppress it, or control it, and the closure of this issue led to abandoning and looking for another library. Too bad.

ahtcx commented

@gilbarbara any chance on reconsidering this?

@ahtcx try npm i react-inlinesvg@next