0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 21:53:27 -05:00
penpot-exporter-figma-plugin/ui-src/converters/createPenpotText.ts
Jordi Sala Morales aec1c38e15
fix group and text
2024-04-16 09:24:53 +00:00

12 lines
430 B
TypeScript

import { PenpotFile } from '@ui/lib/penpot';
import { TEXT_TYPE } from '@ui/lib/types/text/textAttributes';
import { TextShape } from '@ui/lib/types/text/textShape';
import { translateUiBlendMode } from '@ui/translators';
export const createPenpotText = (file: PenpotFile, { type, blendMode, ...rest }: TextShape) => {
file.createText({
type: TEXT_TYPE,
blendMode: translateUiBlendMode(blendMode),
...rest
});
};