0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 21:53:27 -05:00
This commit is contained in:
Alex Sánchez 2024-06-11 13:56:44 +02:00
parent e555463a8f
commit 73f6ea5fb7
No known key found for this signature in database
GPG key ID: 68A95170EEB87E16
2 changed files with 14 additions and 14 deletions

View file

@ -28,10 +28,10 @@ export const transformAutoLayout = (node: BaseFrameMixin): LayoutAttributes => {
export const transformLayoutSizing = ( export const transformLayoutSizing = (
node: LayoutMixin node: LayoutMixin
): Pick<LayoutChildAttributes, 'layoutItemHSizing' | 'layoutItemVSizing'> => { ): Pick<LayoutChildAttributes, 'layoutItemH-Sizing' | 'layoutItemV-Sizing'> => {
return { return {
layoutItemHSizing: translateLayoutSizing(node.layoutSizingHorizontal), 'layoutItemH-Sizing': translateLayoutSizing(node.layoutSizingHorizontal),
layoutItemVSizing: translateLayoutSizing(node.layoutSizingVertical) 'layoutItemV-Sizing': translateLayoutSizing(node.layoutSizingVertical)
}; };
}; };

View file

@ -19,24 +19,24 @@ export type LayoutSizing =
| typeof ITEM_SIZING_AUTO; | typeof ITEM_SIZING_AUTO;
export type LayoutChildAttributes = { export type LayoutChildAttributes = {
layoutItemMarginType?: 'layoutItemMarginType'?:
| 'simple' | 'simple'
| 'multiple' | 'multiple'
| typeof ITEM_MARGIN_SIMPLE_TYPE | typeof ITEM_MARGIN_SIMPLE_TYPE
| typeof ITEM_MARGIN_MULTIPLE_TYPE; | typeof ITEM_MARGIN_MULTIPLE_TYPE;
layoutItemMargin?: { 'layoutItemMargin'?: {
m1?: number; m1?: number;
m2?: number; m2?: number;
m3?: number; m3?: number;
m4?: number; m4?: number;
}; };
layoutItemMaxH?: number; 'layoutItemMaxH'?: number;
layoutItemMinH?: number; 'layoutItemMinH'?: number;
layoutItemMaxW?: number; 'layoutItemMaxW'?: number;
layoutItemMinW?: number; 'layoutItemMinW'?: number;
layoutItemHSizing?: LayoutSizing; 'layoutItemH-Sizing'?: LayoutSizing;
layoutItemVSizing?: LayoutSizing; 'layoutItemV-Sizing'?: LayoutSizing;
layoutItemAlignSelf?: 'layoutItemAlignSelf'?:
| 'start' | 'start'
| 'end' | 'end'
| 'center' | 'center'
@ -45,8 +45,8 @@ export type LayoutChildAttributes = {
| typeof ITEM_ALIGN_SELF_END | typeof ITEM_ALIGN_SELF_END
| typeof ITEM_ALIGN_SELF_CENTER | typeof ITEM_ALIGN_SELF_CENTER
| typeof ITEM_ALIGN_SELF_STRETCH; | typeof ITEM_ALIGN_SELF_STRETCH;
layoutItemAbsolute?: boolean; 'layoutItemAbsolute'?: boolean;
layoutItemZIndex?: number; 'layoutItemZIndex'?: number;
}; };
export type JustifyAlignContent = export type JustifyAlignContent =