0
Fork 0
mirror of https://github.com/penpot/penpot-plugins.git synced 2025-01-07 15:39:49 -05:00

feat(plugin-types): changed component properties to methods

This commit is contained in:
alonso.torres 2024-06-28 14:55:33 +02:00 committed by Alonso Torres
parent f57dcf26aa
commit 0f1af5676f

View file

@ -1259,25 +1259,25 @@ export interface PenpotShapeBase extends PenpotPluginData {
* Returns the equivalent shape in the component main instance. If the current shape is inside a * Returns the equivalent shape in the component main instance. If the current shape is inside a
* main instance will return `null`; * main instance will return `null`;
*/ */
readonly componentRefShape: PenpotShape | null; componentRefShape(): PenpotShape | null;
/* /*
* Returns the root of the component tree structure for the current shape. If the current shape * Returns the root of the component tree structure for the current shape. If the current shape
* is already a root will return itself. * is already a root will return itself.
*/ */
readonly componentRoot: PenpotShape | null; componentRoot(): PenpotShape | null;
/* /*
* Returns the head of the component tree structure for the current shape. If the current shape * Returns the head of the component tree structure for the current shape. If the current shape
* is already a head will return itself. * is already a head will return itself.
*/ */
readonly componentHead: PenpotShape | null; componentHead(): PenpotShape | null;
/* /*
* If the shape is a component instance, returns the reference to the component associated * If the shape is a component instance, returns the reference to the component associated
* otherwise will return null * otherwise will return null
*/ */
readonly component: PenpotLibraryComponent | null; component(): PenpotLibraryComponent | null;
/** /**
* Resizes the shape to the specified width and height. * Resizes the shape to the specified width and height.
@ -2003,7 +2003,7 @@ export interface PenpotLibraryComponent extends PenpotLibraryElement {
/* /*
* Returns the reference to the main component shape. * Returns the reference to the main component shape.
*/ */
mainInstance: PenpotShape; mainInstance(): PenpotShape;
} }
/** /**