Commit 087ee22 1 parent 021c354 commit 087ee22 Copy full SHA for 087ee22
File tree 3 files changed +9
-2
lines changed
packages/layout/src/steps
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @react-pdf/layout " : patch
3
+ ---
4
+
5
+ fix: resolve styles on dynamic elements
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import shouldNodeBreak from '../node/shouldBreak';
16
16
import resolveTextLayout from './resolveTextLayout' ;
17
17
import resolveInheritance from './resolveInheritance' ;
18
18
import { resolvePageDimensions } from './resolveDimensions' ;
19
+ import { resolvePageStyles } from './resolveStyles' ;
19
20
20
21
const isText = ( node ) => node . type === P . Text ;
21
22
@@ -33,8 +34,9 @@ const isDynamic = (node) => !isNil(node.props?.render);
33
34
34
35
const relayoutPage = compose (
35
36
resolveTextLayout ,
36
- resolveInheritance ,
37
37
resolvePageDimensions ,
38
+ resolveInheritance ,
39
+ resolvePageStyles ,
38
40
) ;
39
41
40
42
const warnUnavailableSpace = ( node ) => {
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ const resolveNodeStyles = (container) => (node) => {
55
55
* @param {Object } page document page
56
56
* @returns {Object } document page with resolved styles
57
57
*/
58
- const resolvePageStyles = ( page ) => {
58
+ export const resolvePageStyles = ( page ) => {
59
59
const dpi = page . props ?. dpi || 72 ;
60
60
const width = page . box ?. width || page . style . width ;
61
61
const height = page . box ?. height || page . style . height ;
You can’t perform that action at this time.
0 commit comments