0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-03 13:20:37 -05:00
penpot-exporter-figma-plugin/src/plugin/transformers/transformGroupNode.ts
2024-04-12 16:52:36 +02:00

15 lines
404 B
TypeScript

import { GroupShape } from '@ui/lib/types/group/groupShape';
import { transformSceneNode } from './transformSceneNode';
export const transformGroupNode = async (
node: GroupNode,
baseX: number,
baseY: number
): Promise<GroupShape> => {
return {
type: 'group',
name: node.name,
children: await Promise.all(node.children.map(child => transformSceneNode(child, baseX, baseY)))
};
};