Last active
May 11, 2022 19:00
-
-
Save enqtran/1c98f284da75fe359f72a093918c316a to your computer and use it in GitHub Desktop.
Custom back button in react-native-router-flux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
..... | |
const renderBackButton = () => ( | |
<TouchableOpacity | |
onPress={() => Actions.pop()} | |
> | |
<View style={{ alignItems: 'center' }}> | |
<Image | |
source={require('./components/images/icon_back.png')} | |
style={{ width: 30, height: 20 }} | |
/> | |
{/* | |
<Icon name='ios-arrow-round-back' style={{ color: '#fff' }} /> | |
*/} | |
</View> | |
</TouchableOpacity> | |
); | |
..... | |
<Scene | |
key="document_list" | |
component={DocumentList} | |
title={date_string()} | |
navigationBarStyle={styles.login_style_bar} | |
sceneStyle={styles.scene_style_login} | |
titleStyle={{ color: '#fff' }} | |
renderBackButton={() => renderBackButton()} | |
/> | |
..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice, thanks