0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 05:33:02 -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
): Pick<
LayoutChildAttributes,
'layoutItemH-Sizing' | 'layoutItemV-Sizing' | 'layoutItemAbsolute'
| 'layoutItemH-Sizing'
| 'layoutItemV-Sizing'
| 'layoutItemAbsolute'
| 'layoutItemMaxH'
| 'layoutItemMinH'
| 'layoutItemMaxW'
| 'layoutItemMinW'
> => {
return {
'layoutItemH-Sizing': translateLayoutSizing(node.layoutSizingHorizontal),
'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
};
};