File tree Expand file tree Collapse file tree 3 files changed +19
-17
lines changed
Expand file tree Collapse file tree 3 files changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ export function renderNode(
1010 deps : number = 0 ,
1111 childrenCodes : string [ ] ,
1212) : string {
13+ console . log ( 'renderNode' , props )
1314 const filteredProps = filterProps ( props )
15+
16+ console . log ( 'filteredProps' , filteredProps )
1417 const propsString = propsToString (
1518 filterPropsWithComponent ( component , filteredProps ) ,
1619 )
Original file line number Diff line number Diff line change @@ -124,14 +124,13 @@ export async function renderText(node: TextNode): Promise<{
124124 ) ,
125125 )
126126 const resultChildren = children . flat ( )
127+
127128 if ( resultChildren . length === 1 )
128129 return {
129130 children : resultChildren [ 0 ] . children ,
130131 props : {
131132 ...defaultProps ,
132- ...( defaultProps . typography
133- ? { typography : defaultProps . typography }
134- : resultChildren [ 0 ] . props ) ,
133+ ...resultChildren [ 0 ] . props ,
135134 } ,
136135 }
137136
Original file line number Diff line number Diff line change 11const DEFAULT_PROPS_MAP = {
2- p : / \b 0 ( p x ) ? \b / ,
3- pr : / \b 0 ( p x ) ? \b / ,
4- pt : / \b 0 ( p x ) ? \b / ,
5- pb : / \b 0 ( p x ) ? \b / ,
6- px : / \b 0 ( p x ) ? \b / ,
7- py : / \b 0 ( p x ) ? \b / ,
8- pl : / \b 0 ( p x ) ? \b / ,
9- m : / \b 0 ( p x ) ? \b / ,
10- mt : / \b 0 ( p x ) ? \b / ,
11- mb : / \b 0 ( p x ) ? \b / ,
12- mr : / \b 0 ( p x ) ? \b / ,
13- ml : / \b 0 ( p x ) ? \b / ,
14- mx : / \b 0 ( p x ) ? \b / ,
15- my : / \b 0 ( p x ) ? \b / ,
2+ // p: /\b0(px)?\b/,
3+ // pr: /\b0(px)?\b/,
4+ // pt: /\b0(px)?\b/,
5+ // pb: /\b0(px)?\b/,
6+ // px: /\b0(px)?\b/,
7+ // py: /\b0(px)?\b/,
8+ // pl: /\b0(px)?\b/,
9+ // m: /\b0(px)?\b/,
10+ // mt: /\b0(px)?\b/,
11+ // mb: /\b0(px)?\b/,
12+ // mr: /\b0(px)?\b/,
13+ // ml: /\b0(px)?\b/,
14+ // mx: /\b0(px)?\b/,
15+ // my: /\b0(px)?\b/,
1616 textDecorationSkipInk : / \b a u t o \b / ,
1717 textDecorationThickness : / \b a u t o \b / ,
1818 textDecorationStyle : / \b s o l i d \b / ,
You can’t perform that action at this time.
0 commit comments