oblador / react-native-vector-icons

Customizable Icons for React Native with support for image source and full styling.
https://oblador.github.io/react-native-vector-icons/
MIT License
17.31k stars 2.12k forks source link

How can I remove this activated background color when the icon press? #1471

Closed sundial-dreams closed 11 months ago

sundial-dreams commented 1 year ago
image
 <View style={styles.iconButton} key={i}>
        <TouchableWithoutFeedback
          onPress={() => {
            onTouch(i);
          }}>
          <Icon
            name={icon}
            size={ICON_SIZE}
            color={isActive ? 'black' : '#efefef'}
          />
        </TouchableWithoutFeedback>
      </View>
sundial-dreams commented 1 year ago

Sorry, It's that simple 😼

 <Icon
          name={icon}
          size={ICON_SIZE}
          color={isActive ? 'black' : '#efefef'}
          suppressHighlighting={true} // <--
          onPress={() => onTouch(i)}
   />