0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-08 16:10:07 -05:00
penpot-exporter-figma-plugin/plugin-src/transformers/transformTextNode.ts
2024-05-06 08:06:14 +02:00

25 lines
660 B
TypeScript

import {
transformBlend,
transformDimensionAndPosition,
transformEffects,
transformProportion,
transformSceneNode,
transformStrokes,
transformText
} from '@plugin/transformers/partials';
import { TextShape } from '@ui/lib/types/shapes/textShape';
export const transformTextNode = (node: TextNode, baseX: number, baseY: number): TextShape => {
return {
type: 'text',
name: node.name,
...transformText(node),
...transformDimensionAndPosition(node, baseX, baseY),
...transformEffects(node),
...transformSceneNode(node),
...transformBlend(node),
...transformProportion(node),
...transformStrokes(node)
};
};