Replies: 2 comments 6 replies
-
You can't do this and still get build-time extraction of CSS. This is what the theming api is for |
Beta Was this translation helpful? Give feedback.
4 replies
-
Would this work? Write a function that takes in props as a param and then returns a style with the props evaluated
And the pass the function call into the component as the className
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I've been looking at
vanilla-extract
as a framework / library agnostic way to use jss and it looks promising to this point.One major feature of libraries like
styled-components
is the ability to calculate styles based on component properties or stateful values. Here's an example withstyled-components
in areact
-y syntax:Is there any way to make this possible in
vanilla-extract
? This would be a huge benefit to dynamically style components.Beta Was this translation helpful? Give feedback.
All reactions