|
|
|
|
|
by serverholic
1757 days ago
|
|
Yeah just use the index of the card. For example: cards.map((card, i) => { const isLast = i === cards.length - 1
const className = "card" + isLast ? '' : 'card-margin'
return <Card className={className} />
)}The nice thing about this is you have a full programming language at your fingertips. You could do something with every even card, ever prime number card, etc. |
|
> every prime number card
You got me, CSS alone can't select only primes.