@@ -151,6 +151,8 @@ export default function BuildingSelection({
151151 const { width : windowWidth } = useWindowDimensions ( ) ;
152152 const shouldUseHorizontalWebDirectionsLayout =
153153 isWeb && mode === "directions" && windowWidth >= 1100 ;
154+ const shouldUseStackedWebDirectionsLayout =
155+ isWeb && mode === "directions" && ! shouldUseHorizontalWebDirectionsLayout ;
154156
155157 const { queries, updateQuery, swapQueries, results } = useBuildingSearch ( {
156158 currentBuildingCodes,
@@ -344,6 +346,7 @@ export default function BuildingSelection({
344346 style = { [
345347 { backgroundColor : theme . buildingSelection . inputBackground } ,
346348 styles . inputWrapper ,
349+ shouldUseStackedWebDirectionsLayout && styles . inputWrapperStackedWeb ,
347350 options ?. inputWrapperStyle ,
348351 ] }
349352 >
@@ -379,11 +382,12 @@ export default function BuildingSelection({
379382 textAlign = "left"
380383 style = { [
381384 styles . input ,
385+ shouldUseStackedWebDirectionsLayout && styles . inputStackedWeb ,
382386 {
383387 backgroundColor : theme . buildingSelection . inputBackground ,
384388 borderColor : theme . buildingSelection . borderColor ,
385389 color : theme . buildingSelection . inputText ,
386- fontSize : isWeb ? 18 : 16 ,
390+ fontSize : shouldUseStackedWebDirectionsLayout ? 16 : isWeb ? 18 : 16 ,
387391 paddingLeft : hasMagnifier ? 0 : 8 ,
388392 } ,
389393 ] }
@@ -418,6 +422,7 @@ export default function BuildingSelection({
418422 scheduleBlur ,
419423 handleChange ,
420424 clearField ,
425+ shouldUseStackedWebDirectionsLayout ,
421426 ] ,
422427 ) ;
423428
@@ -512,13 +517,15 @@ export default function BuildingSelection({
512517 { backgroundColor : theme . buildingSelection . containerBackground } ,
513518 styles . directionContainer ,
514519 shouldUseHorizontalWebDirectionsLayout &&
515- styles . directionContainerHorizontal ,
520+ styles . directionContainerHorizontal ,
521+ shouldUseStackedWebDirectionsLayout && styles . directionContainerStackedWeb ,
516522 ] }
517523 >
518524 < View
519525 style = { [
520526 styles . icons ,
521527 shouldUseHorizontalWebDirectionsLayout && styles . iconsHorizontal ,
528+ shouldUseStackedWebDirectionsLayout && styles . iconsStackedWeb ,
522529 ] }
523530 >
524531 < Ionicons
@@ -542,14 +549,14 @@ export default function BuildingSelection({
542549 style = { [
543550 styles . directionFields ,
544551 shouldUseHorizontalWebDirectionsLayout &&
545- styles . directionFieldsHorizontal ,
552+ styles . directionFieldsHorizontal ,
546553 ] }
547554 >
548555 < View
549556 style = { [
550557 styles . directionFieldGroup ,
551558 shouldUseHorizontalWebDirectionsLayout &&
552- styles . directionFieldGroupHorizontal ,
559+ styles . directionFieldGroupHorizontal ,
553560 ] }
554561 >
555562 { renderInput (
@@ -579,6 +586,8 @@ export default function BuildingSelection({
579586 < Text
580587 style = { [
581588 styles . startHint ,
589+ shouldUseStackedWebDirectionsLayout &&
590+ styles . startHintStackedWeb ,
582591 { color : theme . buildingSelection . resultTitle } ,
583592 ] }
584593 testID = "start-hint"
@@ -594,6 +603,7 @@ export default function BuildingSelection({
594603 style = { [
595604 styles . swapButton ,
596605 shouldUseHorizontalWebDirectionsLayout && styles . swapButtonHorizontal ,
606+ shouldUseStackedWebDirectionsLayout && styles . swapButtonStackedWeb ,
597607 ] }
598608 >
599609 < Ionicons
@@ -606,7 +616,7 @@ export default function BuildingSelection({
606616 style = { [
607617 styles . directionFieldGroup ,
608618 shouldUseHorizontalWebDirectionsLayout &&
609- styles . directionFieldGroupHorizontal ,
619+ styles . directionFieldGroupHorizontal ,
610620 ] }
611621 >
612622 { renderInput (
@@ -655,6 +665,12 @@ const styles = StyleSheet.create({
655665 paddingTop : 6 ,
656666 paddingBottom : 8 ,
657667 } ,
668+ directionContainerStackedWeb : {
669+ marginTop : 8 ,
670+ paddingRight : 24 ,
671+ paddingLeft : 8 ,
672+ paddingBottom : 6 ,
673+ } ,
658674 buildingSelectionContainer : {
659675 position : "absolute" ,
660676 width : "100%" ,
@@ -685,12 +701,20 @@ const styles = StyleSheet.create({
685701 marginTop : 0 ,
686702 marginHorizontal : 0 ,
687703 } ,
704+ inputWrapperStackedWeb : {
705+ marginTop : 8 ,
706+ minHeight : 38 ,
707+ paddingVertical : 2 ,
708+ } ,
688709 input : {
689710 paddingRight : "10%" ,
690711 width : "100%" ,
691712 textAlign : "left" ,
692713 minHeight : isWeb ? 44 : undefined ,
693714 } ,
715+ inputStackedWeb : {
716+ minHeight : 38 ,
717+ } ,
694718 directionFields : {
695719 flex : 1 ,
696720 } ,
@@ -725,6 +749,10 @@ const styles = StyleSheet.create({
725749 alignSelf : "center" ,
726750 marginTop : 4 ,
727751 } ,
752+ swapButtonStackedWeb : {
753+ paddingTop : 4 ,
754+ paddingBottom : 0 ,
755+ } ,
728756 results : {
729757 maxHeight : 180 ,
730758 borderRadius : 8 ,
@@ -750,6 +778,10 @@ const styles = StyleSheet.create({
750778 marginLeft : 6 ,
751779 marginBottom : 2 ,
752780 } ,
781+ startHintStackedWeb : {
782+ fontSize : 12 ,
783+ marginBottom : 0 ,
784+ } ,
753785 startHintHorizontal : {
754786 marginLeft : 2 ,
755787 marginTop : 2 ,
@@ -767,4 +799,7 @@ const styles = StyleSheet.create({
767799 paddingTop : 0 ,
768800 marginRight : 10 ,
769801 } ,
802+ iconsStackedWeb : {
803+ paddingTop : 0 ,
804+ } ,
770805} ) ;
0 commit comments