Skip to content

Commit 2f635b8

Browse files
committed
Button disable props are added
1 parent eeda5e6 commit 2f635b8

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

lib/src/components/ModernHeader/ModernHeader.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ const ModernHeader = props => {
2929
leftIconComponent,
3030
rightIconComponent,
3131
leftIconOnPress,
32-
rightIconOnPress
32+
rightIconOnPress,
33+
rightDisable,
34+
leftDisable
3335
} = props;
3436
return (
3537
<View style={styles.container}>
36-
<TouchableOpacity
38+
{!leftDisable && <TouchableOpacity
3739
style={leftCompStyle(left)}
3840
hitSlop={hitslopObj}
3941
onPress={leftIconOnPress}
@@ -46,9 +48,9 @@ const ModernHeader = props => {
4648
color={leftIconColor}
4749
/>
4850
)}
49-
</TouchableOpacity>
51+
</TouchableOpacity>}
5052
<Text style={textStyle}>{text}</Text>
51-
<TouchableOpacity
53+
{!rightDisable && <TouchableOpacity
5254
style={rightCompStyle(right)}
5355
onPress={rightIconOnPress}
5456
>
@@ -60,7 +62,7 @@ const ModernHeader = props => {
6062
color={rightIconColor}
6163
/>
6264
)}
63-
</TouchableOpacity>
65+
</TouchableOpacity>}
6466
</View>
6567
);
6668
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@freakycoder/react-native-header-view",
3-
"version": "0.3.1",
3+
"version": "0.3.11",
44
"description": "Fully customizable Header View for React Native.",
55
"keywords": [
66
"react-native",

0 commit comments

Comments
 (0)