mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 21:53:27 -05:00
parent
35d9d47e2a
commit
044b09207b
2 changed files with 17 additions and 10 deletions
5
.changeset/gorgeous-rings-compete.md
Normal file
5
.changeset/gorgeous-rings-compete.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"penpot-exporter": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix text layers without text content
|
|
@ -22,19 +22,21 @@ export const transformText = async (node: TextNode): Promise<Partial<TextShape>>
|
||||||
content: {
|
content: {
|
||||||
type: 'root',
|
type: 'root',
|
||||||
verticalAlign: translateVerticalAlign(node.textAlignVertical),
|
verticalAlign: translateVerticalAlign(node.textAlignVertical),
|
||||||
children: [
|
children: styledTextSegments.length
|
||||||
|
? [
|
||||||
{
|
{
|
||||||
type: 'paragraph-set',
|
type: 'paragraph-set',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
type: 'paragraph',
|
type: 'paragraph',
|
||||||
children: await translateStyleTextSegments(node, styledTextSegments),
|
children: await translateStyleTextSegments(node, styledTextSegments),
|
||||||
...(styledTextSegments.length ? transformTextStyle(node, styledTextSegments[0]) : {}),
|
...transformTextStyle(node, styledTextSegments[0]),
|
||||||
...(await transformFills(node))
|
...(await transformFills(node))
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
: undefined
|
||||||
},
|
},
|
||||||
growType: translateGrowType(node)
|
growType: translateGrowType(node)
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue