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
Code Connect CLI version [use npx figma -V if using React, or figma -V otherwise, to get the version of your CLI] 1.2.2
Operating system Sonoma 14.7.1
Code Connect file, Figma design and/or relevant code snippet that could help us get more context
I set up a basic component on Figma with 2 props:
A variant with a "true" and "false" value
A variant with "First", "Second", and "Third" values
And here is my code connect file:
import Figma
import SwiftUI
enumComponentValue{case first
case second
case third
}structComponent_doc:FigmaConnect{letcomponent=Text.self
letfigmaNodeUrl="<component_url>"@FigmaEnum("test?", mapping:["false": false,"true": true])vartest:Bool@FigmaEnum("Value", mapping:["First":.first,"Second":.second,"Third":.third], hideDefault: true)varvalue:ComponentValue=.first
varbody:someView{Text("Hello, world!").applyValue(self.value).disabled(self.test)}}extensionText{func applyValue(_ value:ComponentValue)->Text{
// do some configuration
returnself}}
If using the hideDefault on the test var or both, there are no issues. However, using hideDefault on only the value var causes a Code Connect rendering error
I also noticed that if using multiple views or even a variable and a view in the view body as below, the same error occurs no matter the value of test's hideDefault when value has hideDefault: true
Code Connect CLI version [use
npx figma -V
if using React, orfigma -V
otherwise, to get the version of your CLI]1.2.2
Operating system
Sonoma 14.7.1
Code Connect file, Figma design and/or relevant code snippet that could help us get more context
I set up a basic component on Figma with 2 props:
And here is my code connect file:
If using the
hideDefault
on thetest
var or both, there are no issues. However, usinghideDefault
on only thevalue
var causes a Code Connect rendering errorI also noticed that if using multiple views or even a variable and a view in the view body as below, the same error occurs no matter the value of
test
'shideDefault
whenvalue
hashideDefault: true
OR
The text was updated successfully, but these errors were encountered: