Home > Mobile >  Is it possible to configure color of text / background in react without using CSS?
Is it possible to configure color of text / background in react without using CSS?

Time:06-26

I am trying to find out if it is possible to add / change colors using .js file alone without utilising .css on react?

CodePudding user response:

Yep. Check styled-components approach e.g. https://styled-components.com/

CodePudding user response:

you can use inline styles in react like this <p style={{color: 'red, fontSize: '12px'}}>Lorem ipsum</p>
https://www.pluralsight.com/guides/inline-styling-with-react

  • Related