You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to change a page's padding based off page number, so even pages will have bigger padding on the right, and vise versa.
I am trying to use something like this https://react-pdf.org/advanced#dynamic-content, by having a custom Page containing one View with a render prop returning another View that styles according to the page number. The children of the custom component should be passed as the children of that innermost View.
But, I have some styling on the children that is getting lost somewhere along the way.
Here is the custom component:
Here is the children component that is losing styling
Here's what it's supposed to look like (ie passing through Page from line 22 instead of Dummy), without desired page number padding
And here is what it looks like going through Dummy:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I want to change a page's padding based off page number, so even pages will have bigger padding on the right, and vise versa.
I am trying to use something like this https://react-pdf.org/advanced#dynamic-content, by having a custom
Pagecontaining oneViewwith a render prop returning anotherViewthat styles according to the page number. Thechildrenof the custom component should be passed as thechildrenof that innermostView.But, I have some styling on the
childrenthat is getting lost somewhere along the way.Here is the custom component:

Here is the

childrencomponent that is losing stylingHere's what it's supposed to look like (ie passing through Page from line 22 instead of Dummy), without desired page number padding

And here is what it looks like going through Dummy:

Beta Was this translation helpful? Give feedback.
All reactions