Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
alanjhughes committed May 30, 2022
2 parents 5469cef + 752dd05 commit 4aa2cd5
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/components/ResultItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ interface ResultItemProps {
export function ResultItem({ place, onSelectPlace, style }: ResultItemProps) {
return (
<Pressable
style={({ pressed }) => [
{ ...defaultStyles.container, ...style },
{ opacity: pressed ? 0.5 : 1 },
]}
style={{ ...defaultStyles.container, ...style }}
onPress={() => onSelectPlace(place.placeId, place.fullText)}
>
<Text style={defaultStyles.primary}>
{place.primaryText}{' '}
<Text style={defaultStyles.secondary}>{place.secondaryText}</Text>{' '}
</Text>
{({ pressed }) => (
<Text style={[defaultStyles.primary, { opacity: pressed ? 0.5 : 1 }]}>
{place.primaryText}{' '}
<Text style={defaultStyles.secondary}>{place.secondaryText}</Text>{' '}
</Text>
)}
</Pressable>
);
}
Expand Down

0 comments on commit 4aa2cd5

Please sign in to comment.