Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SwiftUI] FigmaApply to support using Figma property values in conditional blocks #229

Open
danielsinclairtill opened this issue Jan 9, 2025 · 0 comments

Comments

@danielsinclairtill
Copy link

danielsinclairtill commented Jan 9, 2025

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!

@danielsinclairtill danielsinclairtill changed the title FigmaApply to support using Figma property values in conditional blocks [SwiftUI] FigmaApply to support using Figma property values in conditional blocks Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant