Skip to content

Instantly share code, notes, and snippets.

@Karthik-B-06
Created May 24, 2021 13:20
Show Gist options
  • Save Karthik-B-06/bf90757eb5b62d9644d732ef5c238c4d to your computer and use it in GitHub Desktop.
Save Karthik-B-06/bf90757eb5b62d9644d732ef5c238c4d to your computer and use it in GitHub Desktop.
{/* Lighter Color Feedback */}
<View style={tailwind('mt-10')}>
<Pressable
style={({ pressed }) => [
tailwind('p-4 items-center border-gray-200 bg-white'),
separatorBorderWidth,
pressed ? tailwind('bg-gray-200') : {},
]}
>
<View>
<Text style={[bodyTextStyle.FS18_MEDIUM]}>Pressable With Background Color</Text>
</View>
</Pressable>
</View>
{/* Darker Color Feedback */}
<View style={tailwind('mt-10')}>
<Pressable
style={({ pressed }) => [
tailwind('p-4 items-center bg-blue-600'),
pressed ? tailwind('bg-blue-700') : {},
]}
>
<View>
<Text style={[bodyTextStyle.FS18_MEDIUM, tailwind('text-white text-center')]}>
Pressable which changes the background to a darker color
</Text>
</View>
</Pressable>
</View>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment