You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using the html version of Code Connect for our custom web component library. Everything here is working, except prefixIcon: figma.instance("Prefix Icon"), or "Suffix Icon" in this instance returns a blank.
Technically, the <nys-button> element expects a suffixIcon and/or prefixIcon attribute with the name of the icon shape, which gets passed to <nys-icon> inside the custom element. You can see, the Prefix Icon is an instance swap that has a prop called "shape" which can reference our library of icons.
This shape name is the name that we need to get to pass into the attribute:
We're using the html version of Code Connect for our custom web component library. Everything here is working, except
prefixIcon: figma.instance("Prefix Icon"),
or"Suffix Icon"
in this instance returns a blank.Technically, the
<nys-button>
element expects asuffixIcon
and/orprefixIcon
attribute with the name of the icon shape, which gets passed to<nys-icon>
inside the custom element. You can see, the Prefix Icon is an instance swap that has a prop called "shape" which can reference our library of icons.This shape name is the name that we need to get to pass into the attribute:
When I tried to nested properties approach:
And output the value of "shape", I'm getting something that looks like an ID:
Is there any way I can capture the name here to pass as a string?
I came across this script for generating a full map of references for each icon, but in addition to this being really cumbersome and hard to maintain, it also seems to work only with React. Any recommendations for custom web components?
Thanks!
The text was updated successfully, but these errors were encountered: