You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating some test scenarios to get experience with vanilla-extract. One of the tests would be to dynamically style a list of components with the theme values, I tried to style using createVar, but it can only be used for one style.
I set up a way that works but I don't believe it's the best possible way.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm creating some test scenarios to get experience with vanilla-extract. One of the tests would be to dynamically style a list of components with the theme values, I tried to style using createVar, but it can only be used for one style.
I set up a way that works but I don't believe it's the best possible way.
I assembled the codes in React/Vite:
App.tsx
theme.css.ts
The idea of the application is:
if the iteration index is even, put the primary color, if odd the secondary
Beta Was this translation helpful? Give feedback.
All reactions