Before you start - checklist
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 because onLoadProgress is called asynchronously, causing a flash of unstyled content on subsequent loads.
- Using
:has selector to check if react-pdf__message is a child of the Document. This works, but requires using modern browser features that may not be compatible with older devices.
Additional information
No response
Before you start - checklist
Description
I would like to make the
Documentcomponent take the full width/height of the screen when it is not loaded (i.e inerror/loading/no-datastate) 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
className. This has a delay becauseonLoadProgressis called asynchronously, causing a flash of unstyled content on subsequent loads.: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