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

TabNavigator Icon with React Navigation #40

Closed
LouisJS opened this issue Jan 24, 2018 · 0 comments
Closed

TabNavigator Icon with React Navigation #40

LouisJS opened this issue Jan 24, 2018 · 0 comments

Comments

@LouisJS
Copy link

LouisJS commented Jan 24, 2018

I'm trying to implement a TabNavigator using React-Navigation.

In order to add a tab, following the documentation, i'm doing this :

class MyHomeScreen extends React.Component {
  static navigationOptions = {
    tabBarLabel: 'Home',
    tabBarIcon: ({ tintColor }) => (
      <Image
        source={require('./chats-icon.png')}
        style={[styles.icon, {tintColor: tintColor}]}
      />
    ),
  };

  render() {
    return (
      ...
    );
  }
}

I did try to replace the Image Component with FontAwesome such as :

import { FontAwesome } from '@expo/vector-icons';
 static navigationOptions = {
    tabBarIcon: ({ tintColor }) => (
      <FontAwesome name="user" size={32} color="tintColor" />
    ),
  };

But i only have my label.

Stackoverflow link : https://stackoverflow.com/questions/48429649/tabnavigator-with-expo-vector-icons

@LouisJS LouisJS closed this as completed Jan 24, 2018
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

1 participant