Skip to content

Commit

Permalink
Changed Screen to screen
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadyXV committed Jan 29, 2019
1 parent cdc58c7 commit 7e28abf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions BottomNavigation/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import NavigatonContext from './NavigatonContext';

type Props = {
title: string,
Screen: Class<Component>,
screen: Class<Component>,
icon: number,
}

Expand All @@ -27,13 +27,13 @@ const styles = StyleSheet.create({
},
});

const Nav = ({ title, Screen, icon }: Props) => (
const Nav = ({ title, screen, icon }: Props) => (
<NavigatonContext.Consumer>
{
({ setActiveScreen, activeScreen, tintColor }) => {
const activeColor = activeScreen === Screen ? tintColor : undefined;
const activeColor = activeScreen === screen ? tintColor : undefined;
return (
<TouchableOpacity style={styles.container} onPress={() => setActiveScreen(Screen)}>
<TouchableOpacity style={styles.container} onPress={() => setActiveScreen(screen)}>
<Image source={icon} style={styles.icon} tintColor={activeColor} />
<Text allowFontScaling={false} style={[styles.title, { color: activeColor }]}>
{title}
Expand Down

0 comments on commit 7e28abf

Please sign in to comment.