jxnblk / rmdi

React Material Design Icons – built with Pixo, Styled Components, and Styled System
https://jxnblk.com/rmdi
MIT License
129 stars 11 forks source link

Different theme providers for different components? #10

Closed silouanwright closed 5 years ago

silouanwright commented 6 years ago

Hey,

So I noticed that rmdi uses styled-system, which uses the theme provider (it's by default using the theme provider we already have in our application). That's great! That's powerful. But... I didn't actually tell this library that I wanted to use that.

Think about this this way: I have some components that follow a pattern from a library. I have other components that follow another. It doesn't seem like any given application supports 2 theme providers at a time. So like... if I grab an external library, and grab it's theme stuff just for THEIR components, there's no way to go "ok only apply this themerprovider to their components". How do I solve for this?

jxnblk commented 6 years ago

This is intentional behavior – the margins and colors you set in your application theme will be picked up by these icons, which is kind of the point of this library and styled-system. If you don't want that behavior, I'd suggest using another MD icon package