react-native-segmented-control-tab icon indicating copy to clipboard operation
react-native-segmented-control-tab copied to clipboard

Ability to change touchable

Open iRoachie opened this issue 4 years ago • 3 comments

Would be awesome if we could change the type of Touchable being used.

Right now it’s TouchableOpacity. Would be awesome if we could use TouchableHighlight

iRoachie avatar Jul 13 '19 05:07 iRoachie

Hi, @iRoachie Would be great if could briefly explain the use case? Thanks

kirankalyan5 avatar Jul 17 '19 18:07 kirankalyan5

The original segmental control on iOS used TouchableHighlight. When tapping on an item, it shows an underColor. Right now you lib doesn’t have any effects at all when touching on an item since you’re using TouchableOpacity with activeOpacity of 1.

Changing this activeOpacity dims the opacity of the entire item including the borders.

iRoachie avatar Jul 17 '19 18:07 iRoachie

ok, then the better idea would be to configure the component to use one of the Touchable... via props with a default one.

I'm bit occupied at the moments, I could look into it sometime later or PR's welcome :)

kirankalyan5 avatar Jul 23 '19 13:07 kirankalyan5