[NEXT JS] Error Only static values are allowed inside of a stylex.create() #519
Replies: 1 comment
-
This is not supported. All styles passed into The only exception to this is variables created used This constraint is documented under the "Constraints" sections of the "Defining Styles" page of the documentation. Specifically, note the second and last thing that is mentioned as "not allowed":
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm encountering an issue when trying to use the stylex.create() function with styles imported from a JSON file, which I'm treating as a mock API to eventually store styles in a database. The JSON file contains CSS rules for different class names, and I'm trying to pass these styles to stylex.create(). However, I'm getting an error "Error: Only static values are allowed inside of a stylex.create() call."
Steps to Reproduce:
Expected Behavior:
I expect to be able to pass the styles imported from the JSON file to stylex.create() without encountering any errors.
sample code:
Beta Was this translation helpful? Give feedback.
All reactions