0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-03 05:10:13 -05:00
This commit is contained in:
Jordi Sala Morales 2024-04-10 10:54:46 +00:00
parent 5ba81d3282
commit 222dbaa5fc
No known key found for this signature in database
GPG key ID: C5127140107F55FD
5 changed files with 14 additions and 2 deletions

View file

@ -8,6 +8,7 @@ export const createPenpotRectangle = (
baseY: number
) => {
file.penpotFile.createRect({
type: Symbol.for('rect'),
name: node.name,
x: node.x + baseX,
y: node.y + baseY,

View file

@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { CircleShape } from './types/circle/circleShape';
import { RectShape } from './types/rect/rectShape';
import { TextShape } from './types/text/textShape';
export interface PenpotFile {
@ -11,7 +12,7 @@ export interface PenpotFile {
closeArtboard(): void;
addGroup(group: any): void;
closeGroup(): void;
createRect(rect: any): void;
createRect(rect: RectShape): void;
createCircle(circle: CircleShape): void;
createText(options: TextShape): void;
createImage(image: any): void;

View file

@ -1,4 +1,5 @@
export type CircleAttributes = {
id?: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
id?: any;
type: symbol;
};

View file

@ -0,0 +1,5 @@
export type RectAttributes = {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
id?: any;
type: symbol;
};

4
src/ui/lib/types/rect/rectShape.d.ts vendored Normal file
View file

@ -0,0 +1,4 @@
import { Shape } from '../shape';
import { RectAttributes } from './rectAttributes';
export type RectShape = Shape & RectAttributes;