figma.nestedProps inside figma.className
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- figma, typescript
- Ambito
- tooling
Direzione di ricerca
Start by reading the Code Connect CLI handling for figma.className and figma.nestedProps, then trace how the example receives the resulting className value. Reproduce the reported case with the provided snippet and check how nested size and color values are serialized. Done means the generated class string no longer contains [object Object] and the nested value can be used as intended; the issue does not name files or tests.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Please provide:
- Code Connect CLI version 1.3.4
- Code Connect file, Figma design and/or relevant code snippet that could help us get more context
Actual code is s
figma.connect('....', {
props: {
className: figma.className([
figma.nestedProps('_tags (main)', {
size: figma.enum('Size', {
md: 'md',
sm: 'sm'
})
}),
figma.enum('Color', {
Black: 'black',
White: 'white',
Red: 'red',
Blue: 'blue'
})
])
},
example: ({ className }) => html`<div class="${className}">DIV</div>`
});
Issue is:
Result is
<div class="[object Object] black">TAG</div>
Probably because of "nestedProps"
But thing is:
- I CAN'T create the className inside "example".
- I CAN'T use Size outside of nested because ... it's a nested properties
- I CAN'T update a bit code and do
class="${nested.size} ${variant}because the result isclass="black" md"(yeah there is a random ")
So the question is, how to fix that ? Is that even fixable ?
- Lingua principale
- TypeScript
- Stelle
- 1.6k
- Fork
- 126
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di figma/code-connect
-
normalizePropName strips `#` characters from Figma property names instead of only the `#id` suffixAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
figma/code-connect#419 ·
-
feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
figma/code-connect#403 ·
-
feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
figma/code-connect#414 ·
-
feature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
figma/code-connect#413 · 1 commento ·
-
feature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
figma/code-connect#412 · 1 commento ·
Tutte le issue di figma/code-connect
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vercel-labs/ui#540 ·
I maintainer di solito rispondono entro 1 giorno
-
accepted ai-dev ai-implementing
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
livesport/homer#218 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Negative values skip k/M abbreviation and medium decimal format on line, stacked-area, and tooltipAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
britecharts/britecharts#1255 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
jeanibarz/knowledge-base-mcp-server#1268 ·
I maintainer di solito rispondono entro 1 giorno