Skip to content

Variant based on instance swap property? #330

@adbutterfield

Description

@adbutterfield
  • Code Connect CLI version: 1.3.6
  • Operating system: macOS 15.7.1

I hit a case where it would be helpful to have a variant based on the name of the component used for an instance swap prop.

The issue is for designs, there's a constraint on the Figma side so sometimes designs use a child layout component inside a parent component, but in React we accept props for that child layout component directly on the parent (the layout behavior is baked into the parent).

It's even a bit more complicated, because there are cases where we don't use that layout, and render the instance swap prop as children of the parent component.

I tried to create a template for this that doesn't use a parser, but I couldn't get children to render correctly...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions