shoutem / theme

Style your React Native components on one place
Other
333 stars 91 forks source link

How can I append to default theme instead of overriding? #34

Closed ingoclaro closed 6 years ago

ingoclaro commented 6 years ago

Hello,

It seems that when passing a theme to StyleProvider it overrides the themed widget completely. For example if I have the following:

const theme = {
  'shoutem.ui.Screen': {
    backgroundColor: 'grey',
  },
}

Most widgets in shoutem.ui will look pretty bad, if they are inside a \ component, because the Screen component looses it's default styles and only has backgroundColor: 'grey'.

Is there a way to extend the base theme in my custom theme and override or add new attributes to it?

Definitely-Not-Vlad commented 6 years ago

I believe this Stack Overflow answer may help.

ingoclaro commented 6 years ago

thanks!