Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom tabs icon in RN 0.54 #2951

Closed
wayne1203 opened this issue Mar 21, 2018 · 4 comments
Closed

Custom tabs icon in RN 0.54 #2951

wayne1203 opened this issue Mar 21, 2018 · 4 comments

Comments

@wayne1203
Copy link

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.27 & 28
  • react-native v0.54

iOS only, Android is fine
It will show Text in RN 0.52 with v4.0.0-beta.27 & 28 but not show in RN 0.54

This is my code for custom tabs icon

var iconPath = !this.props.focused ? this.props.inactive : this.props.active;
const color = !this.props.focused ? "#727171" : "#897854";

return (
	<View style={{flex:1, flexDirection:'column', alignItems:'center', alignSelf:'center', justifyContent: 'center'}}>
		<Image
			style={{width: 25, height: 25}}
			source={iconPath}
		/>
		<Text style={{color: color, fontSize: 10, paddingTop: 5}}>{this.props.title}</Text>
	</View>
);

And the result:
RN 0.52
simulator screen shot - iphone 6 - 2018-03-21 at 11 48 11

RN 0.54
simulator screen shot - iphone 6 - 2018-03-21 at 11 40 05

@highread
Copy link

same problem

@golles
Copy link

golles commented Apr 11, 2018

Same here with RN 55.2 RNRF 4.0.0-beta.28
Android is indeed fine

@MaxInMoon
Copy link
Contributor

See #2981

@wayne1203
Copy link
Author

Thanks #2981, I'll try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants