gilbarbara / react-inlinesvg

An SVG loader component for ReactJS

Home Page:https://codesandbox.io/s/github/gilbarbara/react-inlinesvg/tree/main/demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

broken compatibility

alexjs-dev opened this issue · comments

Prior version of the package (prior to version 1) had a span class="isvg loaded" wrapper on top of the svg.

After the upgrade that wrapper is lost. I have used Styled-components to style every component in the project, even the icons, now all icons (and there are over 80 of imports are unstyled)

Example of an icon in the project.

`export const StyledIconContainer = styled.div`
  span {
    display: inline-block;
    margin-left: 6px;
    svg {
      width: 14px;
      height: 12px;
      & g {
        fill: #FFF !important;
      }
    }
  }
`;`

I will be creating a seperate component to add this wrapper back, but this gave me 1h-1.5h of extra unnecessary work. I think there should be a compatibility option.

That's why it's a major version upgrade and it's described in the release notes.
You can keep using 0.x versions anyway.