ansu5555 / pdf-viewer-reactjs

A simple PDF viewer for React js
https://ansu5555.github.io/pdf-viewer-reactjs/
MIT License
139 stars 64 forks source link

[BUG] The "css" prop doesn't set the passed string as a CSS class to the component wrapper, the "canvasCss" prop does #88

Open gemanepa opened 2 years ago

gemanepa commented 2 years ago

Describe the bug The "css" prop doesn't set the passed string as a CSS class to the component wrapper, the "canvasCss" prop does (while not being added to the canvas html element like it's supposed to) Codesandbox: https://codesandbox.io/s/pdf-viewer-reactjs-fd62g?file=/src/App.js Live version: https://fd62g.csb.app/

How to Reproduce Steps to reproduce the behavior:

  1. Add a css prop and a canvasCss prop with strings values to the PDFViewer component
  2. Run application
  3. Open devtools
  4. You can't see the css prop string being present as a class in the wrapper html node, instead you see the canvasCss prop string present in the wrapper element instead of in the canvas element

Expected behavior The string being passed through the css prop should be present as a css class in the wrapper element, like in the mgr-pdf-viewer-react library. The string being passed through the canvasCss should be present as a css class in the canvas element

Codesandbox https://codesandbox.io/s/pdf-viewer-reactjs-fd62g?file=/src/App.js Live version: https://fd62g.csb.app/