react-desktop icon indicating copy to clipboard operation
react-desktop copied to clipboard

Switch from radium to styled-components

Open gabrielbull opened this issue 7 years ago • 12 comments

~~What are the pros and cons of those three solutions?~~

~~Which one is the most adapted for a component library?~~

~~The new library should allow for extending proposed in #113~~

Switch react-desktop from radium to styled-components. Can be done progressively.

Need to provide multiple ways for the user to extend the style of a component, including className property, style property, etc.

gabrielbull avatar Jan 30 '18 18:01 gabrielbull

Between those,

Definitely styled-components.

Emotion is fine as well but you will no have the same support and some missing features compare to styled-components.

SASS, to be honest, I have almost a year without touching anything outside of JSCSS and unless I have to jump to something outside of React I will keep using styled-components or any other implementation of JSCSS

yordis avatar Jan 31 '18 11:01 yordis

I used styled-components for about 9 months now, I'm pretty convinced of the utility of CSS-in-JS. Writing pure SASS makes us lose a huge amount of flexibility.

When you say "missing features" about emotion @yordis, do you have more details? All I can find on different issues is that both are pretty much the same, with emotion being more smaller and faster.

alacroix avatar Jan 31 '18 21:01 alacroix

Seems like everyone is on-board with styled-components. As for styled-components vs emotion, if they are on par, I think it would be wiser to use styled-components as it has a much bigger user base, with 13 462 stars on Github vs 2 822 for emotion.

gabrielbull avatar Jan 31 '18 21:01 gabrielbull

@alacroix https://github.com/emotion-js/emotion/issues/113#issuecomment-334955156

yordis avatar Jan 31 '18 21:01 yordis

@gabrielbull also the version 3.1 is much faster than before https://twitter.com/mxstbr/status/957905553044463621

yordis avatar Jan 31 '18 21:01 yordis

Let's go for styled-components then 👍

alacroix avatar Jan 31 '18 21:01 alacroix

I can help with styled-components.

bakhaa avatar Oct 20 '18 00:10 bakhaa

Happy to review and merge PRs if anyone wants to make a start.

davej avatar Oct 20 '18 14:10 davej

As mentioned in issue-129 , lets keep mind theming for the two operating systems.

https://www.styled-components.com/docs/advanced

AndrewKralovec avatar Feb 23 '19 17:02 AndrewKralovec

I this suggestion still under consideration?

Since I'm currently building an OS X component library with styled-components (supporting light & dark mode) I might be open to contribute.

pixelass avatar Sep 11 '19 11:09 pixelass

@pixelass Yes, I would be happy to review any contributions.

davej avatar Sep 11 '19 11:09 davej

Right now I'm building things from scratch but I'll look into this library and see if I can at least add a DRAFT for some new components.

pixelass avatar Sep 11 '19 11:09 pixelass