0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 21:53:27 -05:00
penpot-exporter-figma-plugin/plugin-src/transformers/partials/transformChildren.ts
Alex Sánchez 0bcfd7cd71
fix
2024-04-15 14:09:48 +02:00

13 lines
369 B
TypeScript

import { transformSceneNode } from '@plugin/transformers';
import { Children } from '@ui/lib/types/utils/children';
export const transformChildren = async (
node: ChildrenMixin,
baseX: number = 0,
baseY: number = 0
): Promise<Children> => {
return {
children: await Promise.all(node.children.map(child => transformSceneNode(child, baseX, baseY)))
};
};