diff --git a/package.json b/package.json index 79d8f254..c4886597 100644 --- a/package.json +++ b/package.json @@ -140,4 +140,4 @@ "react-dom": "^18.2.0" }, "packageManager": "pnpm@8.6.6" -} +} \ No newline at end of file diff --git a/src/component.jsx b/src/component.jsx index 66b35a19..a62fbd16 100644 --- a/src/component.jsx +++ b/src/component.jsx @@ -113,7 +113,7 @@ export const SocialIcon = React.forwardRef(function SocialIcon(props, ref) { 'aria-label': ariaLabel, ref, }, -
+ -
, + , children, ) }) diff --git a/test/unit/cases.js b/test/unit/cases.js index 1fcbbed6..4ae7d9d4 100644 --- a/test/unit/cases.js +++ b/test/unit/cases.js @@ -313,4 +313,10 @@ export const cases = ({ SocialIcon, getKeys }) => ) }) } + + // from https://github.com/couetilc/react-social-icons/pull/236 + it('renders the svg within an inline element', ({ expect }) => { + render() + expect(link().querySelector('div')).toBeNull() + }) })