mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-21 15:02:27 -05:00
21 lines
541 B
TypeScript
21 lines
541 B
TypeScript
|
import { PenpotFile } from '@ui/lib/types/penpotFile';
|
||
|
import { FrameShape } from '@ui/lib/types/shapes/frameShape';
|
||
|
import { symbolBlendMode, symbolFillGradients } from '@ui/parser/creators/symbols';
|
||
|
|
||
|
import { createItems } from '.';
|
||
|
|
||
|
export const createArtboard = (
|
||
|
file: PenpotFile,
|
||
|
{ type, fills, blendMode, children = [], ...rest }: FrameShape
|
||
|
) => {
|
||
|
file.addArtboard({
|
||
|
fills: symbolFillGradients(fills),
|
||
|
blendMode: symbolBlendMode(blendMode),
|
||
|
...rest
|
||
|
});
|
||
|
|
||
|
createItems(file, children);
|
||
|
|
||
|
file.closeArtboard();
|
||
|
};
|