Skip to content

Commit

Permalink
fix: invalid props (xmlns, id) in SVG example (#2517)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj authored Jan 19, 2024
1 parent 3c62070 commit bc0d4f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/wicked-yaks-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@react-pdf/examples': patch
---

Fix invalid props (xmlns, id) in SVG example
8 changes: 2 additions & 6 deletions packages/examples/src/svg/Heart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@ import React from 'react';
import { Svg, G, Path } from '@react-pdf/renderer';

const Heart = () => (
<Svg viewBox="-40 0 150 100" xmlns="http://www.w3.org/2000/svg">
<Svg viewBox="-40 0 150 100">
<G fill="grey" transform="translate(-36 45.5)">
<Path
id="heart"
d="M 10,30 A 20,20 0,0,1 50,30 A 20,20 0,0,1 90,30 Q 90,60 50,90 Q 10,60 10,30 z"
/>
<Path d="M 10,30 A 20,20 0,0,1 50,30 A 20,20 0,0,1 90,30 Q 90,60 50,90 Q 10,60 10,30 z" />
</G>

<Path
id="heart"
d="M 10,30 A 20,20 0,0,1 50,30 A 20,20 0,0,1 90,30 Q 90,60 50,90 Q 10,60 10,30 z"
fill="none"
stroke="red"
Expand Down

0 comments on commit bc0d4f4

Please sign in to comment.