Variant based on instance swap property?

Offen
#330 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
typescript

Rechercherichtung

Start by reading the Code Connect CLI template handling and instance swap documentation or examples; the issue does not name specific files or tests. Reproduce the case where a parent accepts a child layout component’s props directly, and the case where the instance swap renders as children. Done means a template can express the desired variant and render children correctly.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

API question
  • 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...

Vorherrschende Sprache
TypeScript
Sterne
1.6k
Forks
126
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus figma/code-connect

Alle Issues in figma/code-connect

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.