code-connect
code-connect copied to clipboard
[SwiftUI] FigmaApply to support using Figma property values in conditional blocks
Describe the feature you'd like:
I am requesting an additional feature for the SwiftUI .figmaApply function.
If I define the code connect SwiftUI code generation like below:
@FigmaBoolean("useLabel?")
var useLabel: Bool = false
@FigmaString("label")
var label: String = "Label"
MyComponent()
.figmaApply(useLabel) {
$0.accessibilityLabel(label)
}
In Figma Code Connect playground, when setting the useLabel? property to true, and the label property to something like Test,
instead of the expected generated SwiftUI code block :
MyComponent()
.accessibilityLabel("Test")
it will always generates the code:
MyComponent()
.accessibilityLabel(label)
It would be much appreciated if we could also support using other Figma properties inside the figmaApply conditional blocks, so the result would be like the expected generated SwiftUI code block above.
Thank you!