Skip to content

Instantly share code, notes, and snippets.

@Renatello
Last active August 7, 2017 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Renatello/3424c5f900d2738db19d1425c9344d10 to your computer and use it in GitHub Desktop.
Save Renatello/3424c5f900d2738db19d1425c9344d10 to your computer and use it in GitHub Desktop.
React native tab bar icon with title
const TabIcon = ({ selected, title, icon }) => {
const selectColor = selected ? AppColors.tabbar.iconSelected : AppColors.tabbar.iconDefault;
return (
<View>
<Icon
name={icon}
size={26}
color={selectColor}
/>
<Text>{title}</Text>
</View>
);
}
<Scene
key={'map'}
{...navbarPropsTabs}
title={'Map'}
icon={props => TabIcon({ ...props, icon: 'location-on', title: 'Map' })}
analyticsDesc={'Map'}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment