From 752dd051471e1c42885d87959fe920d0b90d0e48 Mon Sep 17 00:00:00 2001 From: Alan Hughes Date: Mon, 30 May 2022 11:02:49 +0100 Subject: [PATCH] Fix ResultItem Styles --- src/components/ResultItem.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/ResultItem.tsx b/src/components/ResultItem.tsx index 175af6c..f82bf63 100644 --- a/src/components/ResultItem.tsx +++ b/src/components/ResultItem.tsx @@ -11,16 +11,15 @@ interface ResultItemProps { export function ResultItem({ place, onSelectPlace, style }: ResultItemProps) { return ( [ - { ...defaultStyles.container, ...style }, - { opacity: pressed ? 0.5 : 1 }, - ]} + style={{ ...defaultStyles.container, ...style }} onPress={() => onSelectPlace(place.placeId, place.fullText)} > - - {place.primaryText}{' '} - {place.secondaryText}{' '} - + {({ pressed }) => ( + + {place.primaryText}{' '} + {place.secondaryText}{' '} + + )} ); }