mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 21:53:27 -05:00
14 lines
442 B
TypeScript
14 lines
442 B
TypeScript
import { PenpotFile } from '@ui/lib/types/penpotFile';
|
|
import { RectShape } from '@ui/lib/types/shapes/rectShape';
|
|
import { translateFillGradients, translateUiBlendMode } from '@ui/translators';
|
|
|
|
export const createPenpotRectangle = (
|
|
file: PenpotFile,
|
|
{ type, fills, blendMode, ...rest }: RectShape
|
|
) => {
|
|
file.createRect({
|
|
fills: translateFillGradients(fills),
|
|
blendMode: translateUiBlendMode(blendMode),
|
|
...rest
|
|
});
|
|
};
|