Skip to content

Add Document state modifier class names - #2120

Open
luisangelrod wants to merge 1 commit into
wojtekmaj:mainfrom
luisangelrod:feat/document-state-classnames
Open

Add Document state modifier class names#2120
luisangelrod wants to merge 1 commit into
wojtekmaj:mainfrom
luisangelrod:feat/document-state-classnames

Conversation

@luisangelrod

Copy link
Copy Markdown
Contributor

Summary

  • add no-data, loading, and error modifier classes to the Document wrapper
  • derive rendering and wrapper styling from the same state value
  • remove state modifier classes after a document loads successfully
  • preserve the existing wrapper class and user-provided className

Testing

  • yarn workspace react-pdf lint
  • yarn workspace react-pdf tsc
  • yarn workspace react-pdf format
  • yarn workspace react-pdf unit --run src/Document.spec.tsx (46 passed)
  • yarn workspace react-pdf unit --run (197 passed)

Fixes #2057

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose load status of the Document as a className on react-pdf__Document wrapper

1 participant