Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
userSelect
to TouchableOpacity (#2812)
## Description As pointed in [this discussion](#2799), it is not possible to set `userSelect` property on `TouchableOpacity` component. This fixes this problem. ## Test plan <details> <summary> Test code </summary> ```jsx import React from 'react'; import { StyleSheet, View, Text } from 'react-native'; import { TouchableOpacity } from 'react-native-gesture-handler'; export default function EmptyExample() { return ( <View style={styles.container}> <TouchableOpacity userSelect="auto" style={{ width: 100, height: 100, backgroundColor: 'darkgreen' }}> <Text>Test</Text> </TouchableOpacity> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, }); ``` </details>
- Loading branch information