0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-20 06:22:38 -05:00
penpot-exporter-figma-plugin/ui-src/converters/createPenpotRectangle.ts

15 lines
442 B
TypeScript
Raw Normal View History

2024-05-13 10:12:58 +02:00
import { PenpotFile } from '@ui/lib/types/penpotFile';
2024-05-06 08:06:14 +02:00
import { RectShape } from '@ui/lib/types/shapes/rectShape';
2024-04-15 14:03:30 +02:00
import { translateFillGradients, translateUiBlendMode } from '@ui/translators';
2024-04-08 17:50:01 +02:00
2024-04-15 14:03:30 +02:00
export const createPenpotRectangle = (
file: PenpotFile,
{ type, fills, blendMode, ...rest }: RectShape
) => {
file.createRect({
fills: translateFillGradients(fills),
2024-04-15 14:03:30 +02:00
blendMode: translateUiBlendMode(blendMode),
...rest
2024-04-08 17:50:01 +02:00
});
};