Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29457

onPress in Button inside FAB native-base

$
0
0

I create a FAB button, when clicks it displays RRSS icons for React-Native using the library NativeBase.

What I am trying to achieve is make all the Buttons or Icons inside the FAB have their own method with their own behaviour.

<Fab 
    direction="down" 
    position="topRight"
    style={styles.fab}
    active={fabActive}
    containerStyle={{ }}
    onPress={() => this.setState({ fabActive: !fabActive })}>
       <Image
             resizeMode='cover'
             source={itemsImage}
             style={styles.itemsLogo}
      /> 
      <Button style={styles.buttonFab} onPress={() => this.loginFacebook()}>
                        <FontAwesome5  style={styles.iconFab} name="facebook-f" />
      </Button>
      <Button style={styles.buttonFab} onPress={() => this.loginGoogle()}>
               <FontAwesome5 style={styles.iconFab} name="google-plus-g" />
      </Button>


</Fab>

When the FAB button is pressed, it shows the other 2 buttons. However when I click in these 2 buttons the method inside onPress is not being executed.


Viewing all articles
Browse latest Browse all 29457

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>