mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-03 13:20:37 -05:00
15 lines
404 B
TypeScript
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)))
|
|
};
|
|
};
|