mikaelvesavuori / figmagic

Figmagic is the missing piece between DevOps and design: Generate design tokens, export graphics, and extract design token-driven React components from your Figma documents.
https://docs.figmagic.com
MIT License
807 stars 71 forks source link

Support higher-order "compositions" #129

Open mikaelvesavuori opened 2 years ago

mikaelvesavuori commented 2 years ago

Support "compositions" that are higher-order components (groups?) referring to nested elements.

This would enable creating for example a Form that would contain elements (Button, Heading, Paragraph). Currently, this needs to be manually puzzled together, as is currently done in the Figmagic example https://github.com/mikaelvesavuori/figmagic-example).

Supporting this is probably a pretty significant undertaking as elements need to be enumerated (and generated?) before-hand, so these can be referenced in the higher-order component ("Form", in the above example). Because this also lacks a conceptual model in Figmagic, there will certainly be other parts of the source code that need to be adjusted.

Success criteria: