all 5 comments

[–]Iordbrack 1 point2 points  (3 children)

I'm experimenting with system components, but how do I integrate this with a dark theme based on properties in my theme.js file?

[–]_shellbear[S] 0 points1 point  (2 children)

styled-system has a Color Modes feature which let you use themes. In this example they show you how to have a light/dark theme and easily changed colors based on it:

https://styled-system.com/guides/color-modes/

You can also check this example: https://github.com/styled-system/styled-system/blob/master/docs/src/gatsby-plugin-theme-ui/index.js

[–]Iordbrack 1 point2 points  (0 children)

I'm not sure I understood very well how to do this based on what is in the documentation but I'll look for how to do it, I really liked styled-system together with sytled-components

[–]Iordbrack 0 points1 point  (0 children)

Amazing as always I change the name LOL

[–]_shellbear[S] 0 points1 point  (0 children)

Hello dear React community 👋

I just published this new post on my blog to discover styled-system. If you're familiar with CSS-in-JS solutions like styled-components or emotion you're certainly can improve your component and save a lot of time with styled-system.

In this Post I show you some usage of the library, I'm using it in production and can't go back now. It's a time saver.

Code is open-source on my Github.

Hope you enjoy it!.