@@ -24,7 +24,10 @@ const StoreHeader = ({ storeName, description, logoUrl, backgroundUrl, height =
2424
2525 < Stack
2626 direction = { storefrontConfig ( 'styles.StoreHeader.direction' , 'column' ) }
27- px = { storefrontConfig ( 'styles.StoreHeader.padding' , '$4' ) }
27+ pt = { storefrontConfig ( 'styles.StoreHeader.paddingTop' , 0 ) }
28+ pb = { storefrontConfig ( 'styles.StoreHeader.paddingBottom' , 0 ) }
29+ pl = { storefrontConfig ( 'styles.StoreHeader.paddingLeft' , 0 ) }
30+ pr = { storefrontConfig ( 'styles.StoreHeader.paddingRight' , 0 ) }
2831 space = { storefrontConfig ( 'styles.StoreHeader.space' , '$1' ) }
2932 alignItems = { storefrontConfig ( 'styles.StoreHeader.alignItems' , 'center' ) }
3033 justifyContent = { storefrontConfig ( 'styles.StoreHeader.justifyContent' , 'flex-end' ) }
@@ -33,50 +36,58 @@ const StoreHeader = ({ storeName, description, logoUrl, backgroundUrl, height =
3336 zIndex = { 1 }
3437 >
3538 < YStack alignItems = { storefrontConfig ( 'styles.StoreHeader.alignItems' , 'center' ) } space = '$1' >
36- { logoUrl && (
39+ { storefrontConfig ( 'storeHeader.showLogo' ) && logoUrl && (
3740 < YStack >
3841 < FastImage
3942 source = { { uri : logoUrl } }
4043 style = { {
41- height : 45 ,
42- width : 45 ,
44+ height : storefrontConfig ( 'storeHeader.logoHeight' , 45 ) ,
45+ width : storefrontConfig ( 'storeHeader.logoWidth' , 45 ) ,
4346 } }
4447 />
4548 </ YStack >
4649 ) }
47- < Text color = 'white' fontSize = '$8' fontWeight = 'bold' numberOfLines = { 1 } >
48- { storeName }
49- </ Text >
50- < YStack >
51- { description && (
52- < YStack alignItems = 'center' justifyContent = 'center' >
53- < Text color = 'white' fontSize = '$5' opacity = { 0.9 } numberOfLines = { 2 } textAlign = 'center' >
54- { description }
55- </ Text >
56- </ YStack >
57- ) }
58- </ YStack >
50+ { storefrontConfig ( 'storeHeader.showTitle' ) && (
51+ < Text color = 'white' fontSize = '$8' fontWeight = 'bold' numberOfLines = { 1 } >
52+ { storeName }
53+ </ Text >
54+ ) }
55+ { storefrontConfig ( 'storeHeader.showDescription' ) && (
56+ < YStack >
57+ { description && (
58+ < YStack alignItems = 'center' justifyContent = 'center' >
59+ < Text color = 'white' fontSize = '$5' opacity = { 0.9 } numberOfLines = { 2 } textAlign = 'center' >
60+ { description }
61+ </ Text >
62+ </ YStack >
63+ ) }
64+ </ YStack >
65+ ) }
5966 </ YStack >
6067
61- < YStack alignItems = 'center' justifyContent = 'center' >
62- < StoreLocationPicker
63- defaultStoreLocation = { defaultStoreLocation }
64- triggerStyle = { { borderWidth : 1 , backgroundColor : theme [ '$gray-900' ] . val , borderRadius : 10 , paddingHorizontal : 6 , paddingVertical : 3 } }
65- />
66- </ YStack >
68+ { storefrontConfig ( 'storeHeader.showLocationPicker' ) && (
69+ < YStack alignItems = 'center' justifyContent = 'center' >
70+ < StoreLocationPicker
71+ defaultStoreLocation = { defaultStoreLocation }
72+ triggerStyle = { { borderWidth : 1 , backgroundColor : theme [ '$gray-900' ] . val , borderRadius : 10 , paddingHorizontal : 6 , paddingVertical : 3 } }
73+ />
74+ </ YStack >
75+ ) }
6776 </ Stack >
6877
69- < LinearGradient
70- colors = { [ 'rgba(0,0,0,0.5)' , 'rgba(0,0,0,0)' , 'rgba(0,0,0,0.6)' , 'rgba(0,0,0,0.8)' ] }
71- start = { { x : 0 , y : 0 } }
72- end = { { x : 0 , y : 1 } }
73- style = { {
74- position : 'absolute' ,
75- bottom : 0 ,
76- height : '100%' ,
77- width : '100%' ,
78- } }
79- />
78+ { storefrontConfig ( 'storeHeader.showGradient' ) && (
79+ < LinearGradient
80+ colors = { [ 'rgba(0,0,0,0.5)' , 'rgba(0,0,0,0)' , 'rgba(0,0,0,0.6)' , 'rgba(0,0,0,0.8)' ] }
81+ start = { { x : 0 , y : 0 } }
82+ end = { { x : 0 , y : 1 } }
83+ style = { {
84+ position : 'absolute' ,
85+ bottom : 0 ,
86+ height : '100%' ,
87+ width : '100%' ,
88+ } }
89+ />
90+ ) }
8091 </ Animated . View >
8192 ) ;
8293} ;
0 commit comments