tanem / react-svg

:art: A React component that injects SVG into the DOM.

Home Page:https://npm.im/react-svg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Issue] Double wrapper

leobenkel opened this issue · comments

Hello,

Thank you for this library, it is amazing.

I noticed that when I set the wrapper to anything, be a span or div, it then double wrap the svg, like that:

<div class={className}>
    <div>
        <svg>
            ...
        </svg>
    </div>
</div>

I would expect only one wrap, no ?

Thanks for the kind words 🙏

The double wrapper is deliberate, please refer to "Why are there two wrapping elements?" in the FAQ.

Ah sorry 🤦 !
Thank you for pointing me in the right direction.