NEO97online / stencil-styled-components

Style your Stencil apps without stress 💅 Inspired by the original React package, styled-components.
101 stars 14 forks source link

Theming support #7

Closed mpkelly closed 5 years ago

mpkelly commented 5 years ago

Hi,

Do you plan to support theming or is that something that should be handled by the app developer directly? I would like to do dynamic theming as is done with styled-components using a ThemeProvider. I can see that Stencil supports Contexts but as a Stencil newbie I am not sure how everything fits together. I am hoping to make the theme automatically available to every component that was created by the styled object - is this possible currently?

Thanks for your time.

Mike

NEO97online commented 5 years ago

Thanks for the interest in this library, Mike!

It would be great for us to support theming here. I currently don't have time to implement this, but I believe the best way would be using StencilJS State Tunnels.

In short, yes, it seems to be possible, but I don't have a timeframe for completion. Feel free to fork this repository and give it a try!

MatheusBordin commented 5 years ago

Hello guys! Good news, I did make simple implementation of ThemeProvider, working as expect in my tests. The pull-request can be look here.

NEO97online commented 5 years ago

Closed in #9 by @MatheusBordin. Thanks a bunch for the contribution!