Skip to content
Advertisement

Trying to use CSS statements with function-like formatting in JSS but I get an error

I’ve been recently trying to use JSS in my React project. My code is of a button that requires the transformY() property as an animation when you hover but it isn’t working. This is my code and the errors I receive when compiling.

JavaScript
JavaScript
JavaScript

Line 7:24: ‘translateY’ is not defined no-undef
Line 13:20: ‘translateY’ is not defined no-undef

Search for the keywords to learn more about each error.

webpack compiled with 1 error

Advertisement

Answer

You need to add single quote or double quote while defining the CSS.

So use like below

JavaScript

Full code for style:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement