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

14 lines
489 B
TypeScript
Raw Normal View History

import { PenpotFile } from '@ui/lib/penpot';
import { RECT_TYPE } from '@ui/lib/types/rect/rectAttributes';
import { RectShape } from '@ui/lib/types/rect/rectShape';
import { translateFillGradients } from '@ui/translators';
2024-04-08 10:50:01 -05:00
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const createPenpotRectangle = (file: PenpotFile, { type, fills, ...rest }: RectShape) => {
file.createRect({
type: RECT_TYPE,
fills: translateFillGradients(fills),
...rest
2024-04-08 10:50:01 -05:00
});
};