DEV Community

Discussion on: Styling React Components

Collapse
 
clarity89 profile image
Alex K. • Edited

Hi, I think you'd update your example and fix the quotes:

<p style={{marginTop: 10, color: "red"}}>Something went wrong.</p>
Enter fullscreen mode Exit fullscreen mode

The css styles that you pass to the rules need to be a string or number so instead of color: red it is color: "red".
Also I think the correct spelling is kebab-case ;)

Hope this helps!

Collapse
 
bipinrajbhar profile image
Bipin Rajbhar • Edited

Thanks a lot 😅.