Skip to main content

Hi all,
I’m designing a FormControl utility which will be used to pass Nested components inside, like TextField, Password etc.

The structure of the FormControl component in code has couple subcomponents, like FormControl.Label, FormControl.Helper, FormControl.Error. 
During codeconnect I explored a way to code connect subcomponents as figma.string and it worked fine but I faced a problem that FormControl.Helper was always visible in CodeConnect panel in a code snippet, even though Helper prop was false for the component in Figma.

So I decided to have individual subccomponents in Figma like FormControl.Label, FormControl.Helper, FormControl.Error and pass them as nested components and do the code connect using figma.children.

 

Everything works fine, but Figma component props panel looks a little bit clunky. So I’m wondering if there is a way to make figma.string works properly?

 

Thanks!

Be the first to reply!