Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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 this issue Dec 29, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@gemanepa
Copy link

gemanepa commented Dec 29, 2021

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/

@gemanepa gemanepa added the bug Something isn't working label Dec 29, 2021
@gemanepa gemanepa changed the title [BUG] The "css" prop doesn't set the passed string as a CSS class to the component wrapper [BUG] The "css" prop doesn't set the passed string as a CSS class to the component wrapper, the "canvasCss" prop does Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants