figmagic icon indicating copy to clipboard operation
figmagic copied to clipboard

Support images in elements

Open mikaelvesavuori opened this issue 3 years ago • 2 comments

Currently, when generating elements (i.e. "React components"), images are not supported.

Example: If you were to generate a button with a background-image, the generation would attempt to understand the general CSS properties but bypass the image.

I assume that an implementation of this would result in a background-image property to be generated. It would also be necessary to download the image and ensure that one is correctly pointing to it.

mikaelvesavuori avatar Oct 09 '21 07:10 mikaelvesavuori

@mikaelvesavuori is this the same issue as elements not referencing icons (graphics) they were built with in Figma? For example, we have buttons with leading and trailing icons, and these icons are configured as graphics that are pulling correctly using Figmagic. However, the imported button elements are not referencing said graphics in the generated React component.

glouhaichi avatar Jan 12 '22 12:01 glouhaichi

Almost. This issue is about images as defined in CSS. Your issue is about supporting image references in elements, if I am not mistaken. Both of these cases are currently not supported.

mikaelvesavuori avatar Jan 12 '22 12:01 mikaelvesavuori