mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-18 05:22:28 -05:00
dddc457281
* wip * wip * fix something? * wip * wip * wip * fixes * fixes * stroke image * wip * fixes * fixes * remove old code * fix translate fills * remove penpot public uri * remove old code * fix return undefineds * updated packages * finish refactor --------- Co-authored-by: Jordi Sala Morales <jordism91@gmail.com>
28 lines
734 B
TypeScript
28 lines
734 B
TypeScript
import { PenpotFile } from '@ui/lib/penpot';
|
|
import { PenpotNode } from '@ui/lib/types/penpotNode';
|
|
|
|
import {
|
|
createPenpotArtboard,
|
|
createPenpotCircle,
|
|
createPenpotGroup,
|
|
createPenpotPath,
|
|
createPenpotRectangle,
|
|
createPenpotText
|
|
} from '.';
|
|
|
|
export const createPenpotItem = (file: PenpotFile, node: PenpotNode) => {
|
|
switch (node.type) {
|
|
case 'rect':
|
|
return createPenpotRectangle(file, node);
|
|
case 'circle':
|
|
return createPenpotCircle(file, node);
|
|
case 'frame':
|
|
return createPenpotArtboard(file, node);
|
|
case 'group':
|
|
return createPenpotGroup(file, node);
|
|
case 'path':
|
|
return createPenpotPath(file, node);
|
|
case 'text':
|
|
return createPenpotText(file, node);
|
|
}
|
|
};
|