-
-
Notifications
You must be signed in to change notification settings - Fork 992
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Before you start - checklist
- I understand that React-PDF does not aim to be a fully-fledged PDF viewer and is only a tool to make one
- I have checked if this feature request is not already reported
Description
I would like to make the Document component take the full width/height of the screen when it is not loaded (i.e in error/loading/no-data state) so I can center my custom message in it's container.
Proposed solution
Add a className to the Document's wrapper for each of its states like the Message component has.
Alternatives
- Tracking the pending/error/success state externally and using that to add the
className. This has a delay becauseonLoadProgressis called asynchronously, causing a flash of unstyled content on subsequent loads. - Using
:hasselector to check ifreact-pdf__messageis a child of theDocument. This works, but requires using modern browser features that may not be compatible with older devices.
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request