mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 13:43:03 -05:00
19 lines
518 B
TypeScript
19 lines
518 B
TypeScript
import { PenpotFile } from '@ui/lib/types/penpotFile';
|
|
import { PathShape } from '@ui/lib/types/shapes/pathShape';
|
|
import {
|
|
translateFillGradients,
|
|
translatePathContent,
|
|
translateUiBlendMode
|
|
} from '@ui/translators';
|
|
|
|
export const createPenpotPath = (
|
|
file: PenpotFile,
|
|
{ type, fills, blendMode, content, ...rest }: PathShape
|
|
) => {
|
|
file.createPath({
|
|
fills: translateFillGradients(fills),
|
|
blendMode: translateUiBlendMode(blendMode),
|
|
content: translatePathContent(content),
|
|
...rest
|
|
});
|
|
};
|