0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 13:43:03 -05:00

added min-max height-width (#171)

This commit is contained in:
Alex Sánchez 2024-06-17 17:47:53 +02:00 committed by GitHub
parent ebad146d7f
commit 199984d961
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,11 +34,21 @@ export const transformLayoutAttributes = (
node: LayoutMixin node: LayoutMixin
): Pick< ): Pick<
LayoutChildAttributes, LayoutChildAttributes,
'layoutItemH-Sizing' | 'layoutItemV-Sizing' | 'layoutItemAbsolute' | 'layoutItemH-Sizing'
| 'layoutItemV-Sizing'
| 'layoutItemAbsolute'
| 'layoutItemMaxH'
| 'layoutItemMinH'
| 'layoutItemMaxW'
| 'layoutItemMinW'
> => { > => {
return { return {
'layoutItemH-Sizing': translateLayoutSizing(node.layoutSizingHorizontal), 'layoutItemH-Sizing': translateLayoutSizing(node.layoutSizingHorizontal),
'layoutItemV-Sizing': translateLayoutSizing(node.layoutSizingVertical), 'layoutItemV-Sizing': translateLayoutSizing(node.layoutSizingVertical),
'layoutItemAbsolute': node.layoutPositioning === 'ABSOLUTE' 'layoutItemAbsolute': node.layoutPositioning === 'ABSOLUTE',
'layoutItemMaxH': node.maxHeight ?? undefined,
'layoutItemMinH': node.minHeight ?? undefined,
'layoutItemMaxW': node.maxWidth ?? undefined,
'layoutItemMinW': node.minWidth ?? undefined
}; };
}; };