@@ -11,8 +11,10 @@ import { formattedAddressFromPlace, formatAddressSecondaryIdentifier } from '../
1111import PlaceMapView from './PlaceMapView' ;
1212import Badge from './Badge' ;
1313import Spacer from './Spacer' ;
14+ import useAppTheme from '../hooks/use-app-theme' ;
1415
1516const CurrentDestinationSelect = ( { onChange, destination, waypoints = [ ] , snapTo = '100%' , isLoading = false , ...props } ) => {
17+ const { isDarkMode } = useAppTheme ( ) ;
1618 const theme = useTheme ( ) ;
1719 const navigation = useNavigation ( ) ;
1820 const bottomSheetRef = useRef < BottomSheet > ( null ) ;
@@ -38,7 +40,7 @@ const CurrentDestinationSelect = ({ onChange, destination, waypoints = [], snapT
3840 return (
3941 < YStack >
4042 < Pressable onPress = { openBottomSheet } >
41- < YStack bg = '$default' borderWidth = { 1 } borderColor = '$defaultBorder' borderRadius = '$4' px = '$3' py = '$3' { ...props } >
43+ < YStack bg = { isDarkMode ? '$default' : '$gray-200' } borderWidth = { 1 } borderColor = { isDarkMode ? '$defaultBorder' : '$gray-300' } borderRadius = '$4' px = '$3' py = '$3' { ...props } >
4244 < XStack >
4345 < YStack width = { 100 } height = { 90 } >
4446 < PlaceMapView place = { destination } zoom = { 2 } markerSize = 'xs' width = { 100 } height = { 90 } borderWidth = { 1 } borderColor = '$borderColor' />
@@ -50,10 +52,10 @@ const CurrentDestinationSelect = ({ onChange, destination, waypoints = [], snapT
5052 </ YStack >
5153 ) : (
5254 < YStack >
53- < Text size = { 15 } color = '$infoText' fontWeight = 'bold' textTransform = 'uppercase' mb = { 2 } >
55+ < Text size = { 15 } color = { isDarkMode ? '$infoText' : '$gray-700' } fontWeight = 'bold' textTransform = 'uppercase' mb = { 2 } >
5456 { destination . getAttribute ( 'name' ) ?? 'Current Destination' }
5557 </ Text >
56- < Text color = '$textSecondary' textTransform = 'uppercase' mb = '$1' >
58+ < Text color = { isDarkMode ? '$textSecondary' : '$gray-500' } textTransform = 'uppercase' mb = '$1' >
5759 { formattedAddressFromPlace ( destination ) }
5860 </ Text >
5961 < YStack alignSelf = 'flex-start' >
@@ -71,7 +73,7 @@ const CurrentDestinationSelect = ({ onChange, destination, waypoints = [], snapT
7173 ) }
7274 </ YStack >
7375 < YStack justifyContent = 'center' >
74- < FontAwesomeIcon icon = { faChevronRight } color = { theme . infoText . val } />
76+ < FontAwesomeIcon icon = { faChevronRight } color = { isDarkMode ? theme . infoText . val : theme [ 'gray-500' ] . val } />
7577 </ YStack >
7678 </ XStack >
7779 </ YStack >
@@ -109,7 +111,7 @@ const CurrentDestinationSelect = ({ onChange, destination, waypoints = [], snapT
109111 < YStack px = '$4' >
110112 < Button
111113 onPress = { ( ) => handleDestinationSelect ( waypoint ) }
112- size = '$8'
114+ size = { isDestination ? '$9' : '$8' }
113115 bg = { isCompleted ? '$success' : isDestination ? '$info' : '$secondary' }
114116 borderWidth = { 1 }
115117 borderColor = { isCompleted ? '$successBorder' : isDestination ? '$infoBorder' : '$borderColorWithShadow' }
@@ -155,15 +157,15 @@ const CurrentDestinationSelect = ({ onChange, destination, waypoints = [], snapT
155157 alignItems = 'center'
156158 justifyContent = 'center'
157159 >
158- < FontAwesomeIcon icon = { faLocationDot } color = { theme [ '$info' ] . val } />
160+ < FontAwesomeIcon icon = { faLocationDot } color = { isDestination ? theme [ 'white' ] . val : theme [ '$info' ] . val } />
159161 </ YStack >
160162 </ YStack >
161163 ) }
162164 < XStack flex = { 1 } alignItems = 'flex-start' >
163165 < YStack flex = { 1 } >
164166 < XStack alignItems = 'flex-start' justifyContent = 'space-between' mb = '$1' >
165167 < YStack flex = { 1 } space = '$1' >
166- < Text color = '$ textPrimary' fontWeight = 'bold' numberOfLines = { 1 } >
168+ < Text color = { isDestination ? '$white' : '$ textPrimary'} fontWeight = 'bold' numberOfLines = { 1 } >
167169 { waypoint . getAttribute ( 'name' ) ?? waypoint . getAttribute ( 'street1' ) }
168170 </ Text >
169171 { isDestination && < Text color = '$infoText' > (Destination)</ Text > }
@@ -172,10 +174,10 @@ const CurrentDestinationSelect = ({ onChange, destination, waypoints = [], snapT
172174 < Badge status = { waypoint . getAttribute ( 'status' ) } fontSize = '$1' px = '$2' py = '$1' />
173175 ) }
174176 </ XStack >
175- < Text color = '$ textSecondary' numberOfLines = { 1 } >
177+ < Text color = { isDestination ? '$gray-200' : '$ textSecondary'} numberOfLines = { 1 } >
176178 { formattedAddressFromPlace ( waypoint ) }
177179 </ Text >
178- < Text color = '$ textSecondary'> { formatAddressSecondaryIdentifier ( waypoint ) } </ Text >
180+ < Text color = { isDestination ? '$gray-200' : '$ textSecondary'} > { formatAddressSecondaryIdentifier ( waypoint ) } </ Text >
179181 </ YStack >
180182 </ XStack >
181183 </ XStack >
0 commit comments