Created
October 17, 2022 07:53
-
-
Save anatooly/71b7923220dd67db7d40e6eaf5231392 to your computer and use it in GitHub Desktop.
PressableHighlight
This file contains 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
export default function PressableHighlight(props) { | |
return ( | |
<Pressable | |
android_ripple={{ | |
color: '#676B5F', | |
}} | |
style={({ pressed }) => [ | |
Platform.select({ | |
ios: { | |
backgroundColor: pressed ? 'rgba(0,0,0,0.1)' : 'transparent', | |
}, | |
}), | |
props.style, | |
]}> | |
{props.children} | |
</Pressable> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment