mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-05 06:10:52 -05:00
22 lines
590 B
TypeScript
22 lines
590 B
TypeScript
|
import { PenpotFile } from '@ui/lib/penpot';
|
||
|
import { PATH_TYPE } from '@ui/lib/types/path/pathAttributes';
|
||
|
import { PathShape } from '@ui/lib/types/path/pathShape';
|
||
|
import {
|
||
|
translateFillGradients,
|
||
|
translatePathContent,
|
||
|
translateUiBlendMode
|
||
|
} from '@ui/translators';
|
||
|
|
||
|
export const createPenpotPath = (
|
||
|
file: PenpotFile,
|
||
|
{ type, fills, blendMode, content, ...rest }: PathShape
|
||
|
) => {
|
||
|
file.createPath({
|
||
|
type: PATH_TYPE,
|
||
|
fills: translateFillGradients(fills),
|
||
|
blendMode: translateUiBlendMode(blendMode),
|
||
|
content: translatePathContent(content),
|
||
|
...rest
|
||
|
});
|
||
|
};
|