Skip to content

Instantly share code, notes, and snippets.

@anatooly
Created October 17, 2022 07:53
Show Gist options
  • Save anatooly/71b7923220dd67db7d40e6eaf5231392 to your computer and use it in GitHub Desktop.
Save anatooly/71b7923220dd67db7d40e6eaf5231392 to your computer and use it in GitHub Desktop.
PressableHighlight
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