You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I interested with your repo. But something happen. when I declare the reactSVG like this <ReactSVG path={LogoBanner} alt="" svgStyle={{ width:"100%", height:"auto" }} />
that will create div parent with svg tag inside. But the problem is the div parent is different height with the svg tag (the div is more tall then the svg), I inspect and not found which one makes the parent taller
The text was updated successfully, but these errors were encountered:
Any props not part of the documented API are automatically applied to the wrapper element. This means you can do something like apply a classname to the wrapper element like so:
<ReactSVG{/* ... your other props ... */}className="wrapper-class-name"/>
And your associated styles can then target the inner elements once the SVG is rendered, for example:
.wrapper-class-name>div { /* targets the inner div */ }
.wrapper-class-namesvg { /* targets the rendered SVG */ }
You can apply a similar strategy if you're using an inline style library too. In that case, you might end up passing a style prop instead of a className prop when calling ReactSVG as per the above example.
I think that should provide the hooks you need to solve your issue, but keen to hear how you get on so will leave the issue open for a while ⌛️
Will close this issue now @jepicode as I'm pretty confident my previous response is what you're after. Feel free to comment again though if you're still stuck.
Hi, I interested with your repo. But something happen. when I declare the reactSVG like this
<ReactSVG path={LogoBanner} alt="" svgStyle={{ width:"100%", height:"auto" }} />
that will create div parent with svg tag inside. But the problem is the div parent is different height with the svg tag (the div is more tall then the svg), I inspect and not found which one makes the parent taller
The text was updated successfully, but these errors were encountered: