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

15 lines
382 B
TypeScript
Raw Normal View History

import { PenpotFile } from '../lib/penpot';
import { TEXT_TYPE } from '../lib/types/text/textAttributes';
import { TextShape } from '../lib/types/text/textShape';
2024-04-08 10:50:01 -05:00
export const createPenpotText = (
file: PenpotFile,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
{ type, ...rest }: TextShape
2024-04-08 10:50:01 -05:00
) => {
file.createText({
type: TEXT_TYPE,
...rest
2024-04-08 10:50:01 -05:00
});
};