Open
Description
I am getting an TypeError to console from react-pdf-html when running it.
console.error
Error parsing style attribute "width:100%;height:100%" for tag: SVG TypeError: cssParse is not a function
at convertElementStyle (/proj/node_modules/react-pdf-html/src/parse.ts:108:20)
at convertNode (/proj/node_modules/react-pdf-html/src/parse.ts:146:13)
at Array.map (<anonymous>)
at convertNode (/proj/node_modules/react-pdf-html/src/parse.ts:133:35)
at parseHtml (/proj/node_modules/react-pdf-html/src/parse.ts:171:18)
at renderHtml (/proj/node_modules/react-pdf-html/src/render.tsx:369:18)
at Html (/proj/node_modules/react-pdf-html/src/Html.tsx:15:13)
This is probably caused by:
Lines 10 to 11 in b6aa224
Everything works alright if I change it to the following:
import cssTree from 'css-tree';
const { generate, parse: cssParse } = cssTree;
related: #83
Metadata
Metadata
Assignees
Labels
No labels