Re:Have you used styled components and what do you think abo...
by tomvalorsa on Tuesday October 01, 2019 @03:34PM
(#21129623)
styled-components is a module used specifically with react.js (i.e. not web components).
Theming is actually handled quite nicely[1]. Essentially, you create a JS object which represents your theme (colours, fonts, spacing etc.) and pass it to a provider component. This will then provide the theme object to any components beneath it in the component tree, so you can pull out values and use them to style your app.
Theming is actually handled quite nicely[1]. Essentially, you create a JS object which represents your theme (colours, fonts, spacing etc.) and pass it to a provider component. This will then provide the theme object to any components beneath it in the component tree, so you can pull out values and use them to style your app.
[1] https://www.styled-components.com/docs/advanced#theming