Skip to content

Commit

Permalink
Merge pull request #4 from ShadyXV/master
Browse files Browse the repository at this point in the history
Update Prop Type for Nav Component
  • Loading branch information
syaau authored Jan 30, 2019
2 parents 71224de + 002cae0 commit a4d4f9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion BottomNavigation/BottomNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const styles = StyleSheet.create({
paddingBottom: padding,
width: '100%',
flexDirection: 'row',
backgroundColor: 'red',
},
});

Expand Down
12 changes: 6 additions & 6 deletions BottomNavigation/Nav.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// @flow
import React from 'react';
import {
TouchableOpacity, View, Text, Image, StyleSheet,
TouchableOpacity, Text, Image, StyleSheet,
} from 'react-native';

import NavigatonContext from './NavigatonContext';

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

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

0 comments on commit a4d4f9d

Please sign in to comment.