Skip to content

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

@gemanepa

Description

@gemanepa

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/

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions