Skip to content

Commit 743ceb5

Browse files
props changed
`name` renamed to `leftIconName` and a new prop `leftIconFamily` has been added which should ease the change of the left icon
1 parent ddd3cda commit 743ceb5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/NavBar.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ function NavBar({
1616
leftStyle,
1717
leftIconColor,
1818
leftHitSlop,
19-
name,
19+
leftIconName,
20+
leftIconFamily,
2021
onLeftPress,
2122
right,
2223
rightStyle,
@@ -48,10 +49,10 @@ function NavBar({
4849
<View style={[styles.left, leftStyle]}>
4950
<TouchableOpacity onPress={() => onLeftPress && onLeftPress()} hitSlop={leftHitSlop}>
5051
<Icon
51-
family="evilicons"
52+
family={leftIconFamily || "evilicons"}
5253
color={leftIconColor || theme.COLORS.ICON}
5354
size={theme.SIZES.BASE * 1.0625}
54-
name={name || (back ? 'chevron-left' : 'navicon')}
55+
name={leftIconName || (back ? 'chevron-left' : 'navicon')}
5556
/>
5657
</TouchableOpacity>
5758
</View>
@@ -118,7 +119,8 @@ NavBar.propTypes = {
118119
style: PropTypes.any,
119120
styles: PropTypes.any,
120121
theme: PropTypes.any,
121-
name: PropTypes.string,
122+
leftIconName: PropTypes.string,
123+
leftIconFamily: PropTypes.string,
122124
hideLeft: PropTypes.bool,
123125
hideRight: PropTypes.bool,
124126
};

0 commit comments

Comments
 (0)