0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 13:43:03 -05:00
penpot-exporter-figma-plugin/ui-src/converters/createPenpotArtboard.ts
2024-05-13 10:12:58 +02:00

17 lines
397 B
TypeScript

import { PenpotFile } from '@ui/lib/types/penpotFile';
import { FrameShape } from '@ui/lib/types/shapes/frameShape';
import { createPenpotItem } from '.';
export const createPenpotArtboard = (
file: PenpotFile,
{ type, children = [], ...rest }: FrameShape
) => {
file.addArtboard(rest);
for (const child of children) {
createPenpotItem(file, child);
}
file.closeArtboard();
};