So, let’s see…if I have a Figma file with let’s say 5 instances of the same library component, but with different variants:
Component Inst1–VarA *** Inst2–VarB *** Inst3–VarC *** Inst4–VarD *** Inst5 – VarF
If i need to import via plugin each of these instances to a new file, how do I exctract/find out…the selected variant and work out its key to be used in expressions like:
figma.importComponentByKeyAsync(key)
I am getting a bit lost in the Json response here…the Json response shows node children in pages with type: "INSTANCE"
and another field a bit below componentId
: “XXXX:XXXX” however, in the code TS reports Property 'componentId' does not exist on type 'InstanceNode'