ptomasroos / react-native-tab-navigator

A tab bar that switches between scenes, written in JS for cross-platform support
MIT License
2.4k stars 416 forks source link

Sets selected icon style depending on component type #84

Closed jadnco closed 6 years ago

jadnco commented 8 years ago

This resolves https://github.com/exponentjs/react-native-tab-navigator/issues/68

jadnco commented 8 years ago

Just a note that this removes the warning:

Warning: Failed propType: Invalid props.style key `tintColor` supplied to `View`

But it will not set the defaultSelected style to anything other than <Text /> or <View />.

ide commented 8 years ago

This doesn't work if you pass in a higher-order component that renders its own Text/Image child. We need a different approach.

jadnco commented 8 years ago

@ide Yes, you are right. It does get rid of the warning message though. Custom components should just use the renderSelectedIcon property.

ptomasroos commented 6 years ago

Will close since this issue is more than a year, feel free to a open a new if this is still a issue.