ordering-ui-react-native 0.16.16 → 0.16.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.16.16",
3
+ "version": "0.16.19",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -45,7 +45,7 @@ export const BusinessItemAccordion = (props: any) => {
45
45
  }, [orderState?.carts])
46
46
 
47
47
  return (
48
- <BIContainer isClosed={isClosed} checkoutVisible={!isActive && !isClosed && !!isProducts && !checkoutButtonDisabled}>
48
+ <BIContainer isClosed={isClosed} isMultiCheckout={isMultiCheckout} checkoutVisible={!isActive && !isClosed && !!isProducts && !checkoutButtonDisabled}>
49
49
  <BIHeader
50
50
  isClosed={isClosed}
51
51
  onPress={() => !isClosed ? setActiveState(!isActive) : isClosed}
@@ -7,8 +7,12 @@ export const BIContainer = styled.View`
7
7
  opacity: 1;
8
8
  border-radius: 7.6px;
9
9
  overflow: hidden;
10
+ ${(props: any) => !props.isMultiCheckout && css`
11
+ min-height: 120px;
12
+ `}
10
13
  ${(props: any) => props.isClosed && css`
11
14
  opacity: 0.5;
15
+ min-height: 60px;
12
16
  `}
13
17
  `
14
18
 
@@ -31,7 +31,8 @@ import {
31
31
  ListWrapper,
32
32
  FeaturedWrapper,
33
33
  OrderProgressWrapper,
34
- FarAwayMessage
34
+ FarAwayMessage,
35
+ AddressInputContainer
35
36
  } from './styles';
36
37
 
37
38
  import { SearchBar } from '../SearchBar';
@@ -84,7 +85,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
84
85
  wrapperOrderOptions: {
85
86
  width: '100%',
86
87
  flexDirection: 'row',
87
- justifyContent: 'space-between',
88
+ justifyContent: 'center',
88
89
  marginBottom: 10,
89
90
  zIndex: 100,
90
91
  },
@@ -94,7 +95,10 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
94
95
  borderRadius: 10,
95
96
  },
96
97
  searchInput: {
97
- fontSize: 12,
98
+ fontSize: 16,
99
+ backgroundColor: theme.colors.white,
100
+ paddingLeft: 10,
101
+ paddingTop: 7
98
102
  },
99
103
  iconStyle: {
100
104
  fontSize: 18,
@@ -104,6 +108,11 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
104
108
  farAwayMsg: {
105
109
  paddingVertical: 6,
106
110
  paddingHorizontal: 20
111
+ },
112
+ inputContainerStyles: {
113
+ backgroundColor: theme.colors.white,
114
+ borderColor: theme.colors.backgroundGray,
115
+ borderWidth: 1,
107
116
  }
108
117
  });
109
118
 
@@ -124,7 +133,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
124
133
  Number(configs?.max_days_preorder?.value) > 0
125
134
  const isPreOrderSetting = configs?.preorder_status_enabled?.value === '1'
126
135
  const timerId = useRef<any>(false)
127
- const [favoriteIds, setFavoriteIds] = useState<any>([])
136
+ const [favoriteIds, setFavoriteIds] = useState<any>([])
128
137
 
129
138
  // const panResponder = useRef(
130
139
  // PanResponder.create({
@@ -219,7 +228,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
219
228
  }, [orderState?.options?.address?.location])
220
229
 
221
230
  useEffect(() => {
222
- if(!orderState?.loading){
231
+ if (!orderState?.loading) {
223
232
  setOrderTypeValue(orderState?.options?.type)
224
233
  }
225
234
  }, [orderState?.options?.type])
@@ -232,15 +241,15 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
232
241
  )
233
242
 
234
243
  useEffect(() => {
235
- if (!businessesList?.businesses?.length) return
236
- const ids = [...favoriteIds]
237
- businessesList.businesses.forEach((business: any) => {
238
- if (business?.favorite) {
239
- ids.push(business?.id)
240
- }
241
- })
242
- setFavoriteIds([...new Set(ids)])
243
- }, [businessesList?.businesses?.length])
244
+ if (!businessesList?.businesses?.length) return
245
+ const ids = [...favoriteIds]
246
+ businessesList.businesses.forEach((business: any) => {
247
+ if (business?.favorite) {
248
+ ids.push(business?.id)
249
+ }
250
+ })
251
+ setFavoriteIds([...new Set(ids)])
252
+ }, [businessesList?.businesses?.length])
244
253
 
245
254
  return (
246
255
  <ScrollView style={styles.container} onScroll={(e) => handleScroll(e)} showsVerticalScrollIndicator={false}
@@ -251,15 +260,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
251
260
  />
252
261
  }
253
262
  >
254
- <HeaderWrapper
255
- source={theme.images.backgrounds.business_list_header}
256
- style={{ paddingTop: top + 20 }}>
257
- {!auth && (
258
- <TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
259
- <OIcon src={theme.images.general.arrow_left} width={20} style={{ tintColor: theme.colors.white }} />
260
- </TouchableOpacity>
261
- )}
262
-
263
+ <View style={{ height: isFarAway ? 150 : 100, marginTop: Platform.OS == 'ios' ? 0 : 50 }}>
263
264
  <Search>
264
265
  <AddressInput
265
266
  onPress={() =>
@@ -271,15 +272,22 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
271
272
  isGuestUser: isGuestUser
272
273
  })
273
274
  }>
274
- <OIcon
275
- src={theme.images.general.pin}
276
- color={theme.colors.disabled}
277
- width={16}
278
- style={{ marginRight: 10 }}
279
- />
280
- <OText size={12} numberOfLines={1} style={{ width: '90%' }}>
281
- {orderState?.options?.address?.address}
282
- </OText>
275
+ <AddressInputContainer>
276
+ <OIcon
277
+ src={theme.images.general.pin}
278
+ color={theme.colors.disabled}
279
+ width={16}
280
+ style={{ marginRight: 10 }}
281
+ />
282
+ <OText size={12} numberOfLines={1}>
283
+ {orderState?.options?.address?.address}
284
+ </OText>
285
+ <OIcon
286
+ src={theme.images.general.arrow_down}
287
+ width={10}
288
+ style={{ marginStart: 8 }}
289
+ />
290
+ </AddressInputContainer>
283
291
  </AddressInput>
284
292
  </Search>
285
293
  {isFarAway && (
@@ -288,16 +296,9 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
288
296
  <OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'You are far from this address')}</OText>
289
297
  </FarAwayMessage>
290
298
  )}
299
+
291
300
  <OrderControlContainer>
292
301
  <View style={styles.wrapperOrderOptions}>
293
- <WrapMomentOption onPress={() => navigation.navigate('OrderTypes', { configTypes: configTypes, setOrderTypeValue })}>
294
- <OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textSecondary}>{t(getTypesText(orderTypeValue || orderState?.options?.type || 1), 'Delivery')}</OText>
295
- <OIcon
296
- src={theme.images.general.arrow_down}
297
- width={10}
298
- style={{ marginStart: 8 }}
299
- />
300
- </WrapMomentOption>
301
302
  {isPreOrderSetting && (
302
303
  <WrapMomentOption
303
304
  onPress={() => handleMomentClick()}>
@@ -319,27 +320,48 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
319
320
  )}
320
321
  </WrapMomentOption>
321
322
  )}
322
-
323
- {!businessId && (
324
- <SearchBar
325
- onSearch={handleChangeSearch}
326
- searchValue={searchValue}
327
- lazyLoad
328
- isCancelXButtonShow={!!searchValue}
329
- borderStyle={styles.borderStyle}
330
- onCancel={() => handleChangeSearch('')}
331
- placeholder={t('SEARCH', 'Search')}
332
- height={26}
333
- isDisabled={!businessTypes}
334
- inputStyle={{ ...styles.searchInput, ...Platform.OS === 'ios' ? {} : { paddingBottom: 4 } }}
335
- onSubmitEditing={() => { configs?.advanced_business_search_enabled?.value === '1' && navigation.navigate('BusinessSearch', { businessTypes, defaultTerm: searchValue }) }}
323
+ <WrapMomentOption onPress={() => navigation.navigate('OrderTypes', { configTypes: configTypes, setOrderTypeValue })}>
324
+ <OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textSecondary}>{t(getTypesText(orderTypeValue || orderState?.options?.type || 1), 'Delivery')}</OText>
325
+ <OIcon
326
+ src={theme.images.general.arrow_down}
327
+ width={10}
328
+ style={{ marginStart: 8 }}
336
329
  />
337
- )}
338
-
330
+ </WrapMomentOption>
339
331
  </View>
340
332
  </OrderControlContainer>
333
+ </View>
334
+ <HeaderWrapper
335
+ source={theme.images.backgrounds.business_list_header}
336
+ style={{ paddingTop: top + 20 }}
337
+ resizeMode='stretch'
338
+ >
339
+ {!auth && (
340
+ <TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
341
+ <OIcon src={theme.images.general.arrow_left} width={20} style={{ tintColor: theme.colors.white }} />
342
+ </TouchableOpacity>
343
+ )}
341
344
  </HeaderWrapper>
342
-
345
+ {!businessId && (
346
+ <SearchBar
347
+ onSearch={handleChangeSearch}
348
+ searchValue={searchValue}
349
+ lazyLoad
350
+ hideIcon
351
+ isCancelXButtonShow={!!searchValue}
352
+ onCancel={() => handleChangeSearch('')}
353
+ placeholder={t('SEARCH', 'Search')}
354
+ height={50}
355
+ isDisabled={!businessTypes}
356
+ inputContainerStyles={styles.inputContainerStyles}
357
+ containerStyles={{
358
+ marginHorizontal: 40,
359
+ marginTop: 20
360
+ }}
361
+ inputStyle={{ ...styles.searchInput, ...Platform.OS === 'ios' ? { paddingBottom: 6 } : { paddingBottom: 4 } }}
362
+ onSubmitEditing={() => { configs?.advanced_business_search_enabled?.value === '1' && navigation.navigate('BusinessSearch', { businessTypes, defaultTerm: searchValue }) }}
363
+ />
364
+ )}
343
365
  <OrderProgressWrapper>
344
366
  <OrderProgress
345
367
  {...props}
@@ -408,7 +430,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
408
430
  />
409
431
  )}
410
432
  {businessesList.businesses?.map(
411
- (business: any, i : number) => (
433
+ (business: any, i: number) => (
412
434
  <BusinessController
413
435
  key={`${business.id}_` + i}
414
436
  business={business}
@@ -15,6 +15,7 @@ export const Search = styled.View`
15
15
  justify-content: flex-end;
16
16
  align-items: center;
17
17
  margin-vertical: 10px;
18
+ margin-horizontal: 20px;
18
19
  `
19
20
 
20
21
  export const AddressInput = styled.TouchableOpacity`
@@ -39,7 +40,7 @@ export const OrderControlContainer = styled.View`
39
40
  `
40
41
 
41
42
  export const WrapMomentOption = styled.TouchableOpacity`
42
- background-color: ${(props: any) => props.theme.colors.backgroundGray100};
43
+ background-color: ${(props: any) => props.theme.colors.white};
43
44
  border-radius: 7.6px;
44
45
  font-size: 12px;
45
46
  max-width: 240px;
@@ -53,7 +54,7 @@ export const WrapMomentOption = styled.TouchableOpacity`
53
54
 
54
55
  export const HeaderWrapper = styled.ImageBackground`
55
56
  width: 100%;
56
- height: 370px;
57
+ height: 270px;
57
58
  padding: 20px 40px;
58
59
  background-color: transparent;
59
60
  `;
@@ -79,7 +80,14 @@ export const FarAwayMessage = styled.View`
79
80
  flex-direction: row;
80
81
  align-items: center;
81
82
  background-color: ${(props: any) => props.theme.colors.warning1};
82
- margin-bottom: 25px;
83
+ margin-bottom: 10px;
83
84
  border-radius: 7.6px;
84
85
  border: 1px solid ${(props: any) => props.theme.colors.warning5};
85
86
  `
87
+
88
+ export const AddressInputContainer = styled.View`
89
+ flex-direction: row;
90
+ width: 100%;
91
+ align-items: center;
92
+ justify-content: center
93
+ `
@@ -418,31 +418,35 @@ const CartUI = (props: any) => {
418
418
  )}
419
419
  </OSBill>
420
420
  )}
421
- {cart?.valid_products ? (
422
- <CheckoutAction>
423
- <OButton
424
- text={(cart?.subtotal >= cart?.minimum || !cart?.minimum) && cart?.valid_address ? (
425
- !openUpselling !== canOpenUpselling ? t('CHECKOUT', 'Checkout') : t('LOADING', 'Loading')
426
- ) : !cart?.valid_address ? (
427
- `${t('OUT_OF_COVERAGE', 'Out of Coverage')}`
428
- ) : (
429
- `${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
430
- )}
431
- bgColor={(cart?.subtotal < cart?.minimum || !cart?.valid_address) ? theme.colors.secundary : theme.colors.primary}
432
- isDisabled={(openUpselling && !canOpenUpselling) || cart?.subtotal < cart?.minimum || !cart?.valid_address}
433
- borderColor={theme.colors.primary}
434
- imgRightSrc={null}
435
- textStyle={{ color: 'white', textAlign: 'center', flex: 1 }}
436
- onClick={() => setOpenUpselling(true)}
437
- style={{ width: '100%', flexDirection: 'row', justifyContent: 'center', borderRadius: 7.6, shadowOpacity: 0 }}
438
- />
439
- </CheckoutAction>
440
- ) : (
441
- <View style={{ alignItems: 'center', width: '100%' }}>
442
- <OText size={12} color={theme.colors.red} style={{ textAlign: 'center', marginTop: 5 }}>
443
- {t('WARNING_INVALID_PRODUCTS_CHECKOUT', 'To continue with your checkout, please remove from your cart the products that are not available.')}
444
- </OText>
445
- </View>
421
+ {!isMultiCheckout && (
422
+ <>
423
+ {cart?.valid_products ? (
424
+ <CheckoutAction>
425
+ <OButton
426
+ text={(cart?.subtotal >= cart?.minimum || !cart?.minimum) && cart?.valid_address ? (
427
+ !openUpselling !== canOpenUpselling ? t('CHECKOUT', 'Checkout') : t('LOADING', 'Loading')
428
+ ) : !cart?.valid_address ? (
429
+ `${t('OUT_OF_COVERAGE', 'Out of Coverage')}`
430
+ ) : (
431
+ `${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
432
+ )}
433
+ bgColor={(cart?.subtotal < cart?.minimum || !cart?.valid_address) ? theme.colors.secundary : theme.colors.primary}
434
+ isDisabled={(openUpselling && !canOpenUpselling) || cart?.subtotal < cart?.minimum || !cart?.valid_address}
435
+ borderColor={theme.colors.primary}
436
+ imgRightSrc={null}
437
+ textStyle={{ color: 'white', textAlign: 'center', flex: 1 }}
438
+ onClick={() => setOpenUpselling(true)}
439
+ style={{ width: '100%', flexDirection: 'row', justifyContent: 'center', borderRadius: 7.6, shadowOpacity: 0 }}
440
+ />
441
+ </CheckoutAction>
442
+ ) : (
443
+ <View style={{ alignItems: 'center', width: '100%' }}>
444
+ <OText size={12} color={theme.colors.red} style={{ textAlign: 'center', marginTop: 5 }}>
445
+ {t('WARNING_INVALID_PRODUCTS_CHECKOUT', 'To continue with your checkout, please remove from your cart the products that are not available.')}
446
+ </OText>
447
+ </View>
448
+ )}
449
+ </>
446
450
  )}
447
451
  </BusinessItemAccordion>
448
452
 
@@ -107,7 +107,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
107
107
  {t('PAYMENT_METHODS', 'Payment Methods')}
108
108
  </OText>
109
109
  {paymethodsAndWallets.loading ? (
110
- <Placeholder style={{ marginTop: 10 }} Animation={Fade}>
110
+ <Placeholder style={{ marginTop: 10, marginBottom: 10 }} Animation={Fade}>
111
111
  <View style={{ display: 'flex', flexDirection: 'row' }}>
112
112
  {[...Array(3)].map((_, i) => (
113
113
  <PlaceholderLine
@@ -115,7 +115,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
115
115
  width={37}
116
116
  height={80}
117
117
  noMargin
118
- style={{ borderRadius: 10, marginRight: 10 }}
118
+ style={{ borderRadius: 10, marginRight: 10, }}
119
119
  />
120
120
  ))}
121
121
  </View>
@@ -77,7 +77,8 @@ const MultiCheckoutUI = (props: any) => {
77
77
 
78
78
  const configTypes = configs?.order_types_allowed?.value.split('|').map((value: any) => Number(value)) || []
79
79
  const isPreOrder = configs?.preorder_status_enabled?.value === '1'
80
- const isDisablePlaceOrderButton = !(paymethodSelected?.paymethod_id || paymethodSelected?.wallet_id) || placing
80
+ const maximumCarts = 5
81
+ const isDisablePlaceOrderButton = !(paymethodSelected?.paymethod_id || paymethodSelected?.wallet_id) || openCarts.length > maximumCarts
81
82
 
82
83
  const [isUserDetailsEdit, setIsUserDetailsEdit] = useState(false);
83
84
  const [phoneUpdate, setPhoneUpdate] = useState(false);
@@ -240,6 +241,7 @@ const MultiCheckoutUI = (props: any) => {
240
241
  cart={cart}
241
242
  cartuuid={cart.uuid}
242
243
  isMultiCheckout
244
+ onNavigationRedirect={(route: string, params: any) => props.navigation.navigate(route, params)}
243
245
  />
244
246
  <View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginTop: 13, marginHorizontal: -40 }} />
245
247
  </React.Fragment>
@@ -264,6 +266,11 @@ const MultiCheckoutUI = (props: any) => {
264
266
  </OText>
265
267
  </ChCartsTotal>
266
268
  )}
269
+ {openCarts.length > maximumCarts && (
270
+ <OText size={14} color={theme.colors.danger5} style={{ marginVertical: 20 }}>
271
+ {t('WARNING_MAXIMUM_CARTS', 'You can only pay for a maximum of 5 carts, please discard one or more to continue.')}
272
+ </OText>
273
+ )}
267
274
  </ChCarts>
268
275
  </ChSection>
269
276
  </ChContainer>
@@ -258,25 +258,27 @@ const SingleOrderCardUI = (props: any) => {
258
258
  return (
259
259
  <SingleOrderContainer>
260
260
  <View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 35 }}>
261
- <View>
261
+ <View style={{ flex: 1, marginRight: 10 }}>
262
262
  <OText size={16} lineHeight={24} mBottom={5} weight={'500'} color={theme.colors.textNormal}>
263
263
  {t('ORDER', 'Order')} #{order.id}
264
264
  </OText>
265
- <View style={{ flexDirection: 'row', alignItems: 'center' }}>
265
+ <View style={{ flexDirection: 'row' }}>
266
266
  <OText size={12} lineHeight={18} color={theme.colors.textNormal}>{orderTypes?.find((type: any) => order?.delivery_type === type?.value)?.text}:</OText>
267
- <OText mLeft={10} size={12} lineHeight={18} color={theme.colors.textNormal}>
268
- {
269
- order?.delivery_datetime_utc
270
- ? parseDate(order?.delivery_datetime_utc)
271
- : parseDate(order?.delivery_datetime, { utc: false })
272
- }
273
- </OText>
267
+ <View style={{ flex: 1 }}>
268
+ <OText mLeft={5} size={12} lineHeight={18} color={theme.colors.textNormal}>
269
+ {
270
+ order?.delivery_datetime_utc
271
+ ? parseDate(order?.delivery_datetime_utc)
272
+ : parseDate(order?.delivery_datetime, { utc: false })
273
+ }
274
+ </OText>
275
+ </View>
274
276
  </View>
275
277
  </View>
276
278
  <OButton
277
279
  onClick={() => handleGoToOrderDetails(order?.uuid)}
278
- textStyle={{ color: theme.colors.primary, textAlign: 'center' }}
279
- style={{ flexDirection: 'row', justifyContent: 'center', borderRadius: 7.6, shadowOpacity: 0 }}
280
+ textStyle={{ color: theme.colors.primary, textAlign: 'center', fontSize: 14 }}
281
+ style={{ flexDirection: 'row', justifyContent: 'center', borderRadius: 7.6, shadowOpacity: 0, paddingLeft: 5, paddingRight: 5, height: 44 }}
280
282
  text={t('ORDER_DETAILS', 'Order Details')}
281
283
  bgColor={theme.colors.white}
282
284
  borderColor={theme.colors.primary}
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect } from 'react'
2
2
  import { useLanguage, useUtils, useToast, ToastType, MultiOrdersDetails as MultiOrdersDetailsController } from 'ordering-components/native'
3
- import { View, StyleSheet } from 'react-native'
3
+ import { View, StyleSheet, BackHandler } from 'react-native'
4
4
  import { useTheme } from 'styled-components/native'
5
5
  import { OText, OButton } from '../shared'
6
6
  import { Container } from '../../layouts/Container'
@@ -53,12 +53,13 @@ export const MultiOrdersDetailsUI = (props: any) => {
53
53
  }
54
54
  }
55
55
 
56
- const handleBackNavigation = () => {
56
+ const handleArrowBack: any = () => {
57
57
  if (!isFromMultiCheckout) {
58
58
  navigation?.canGoBack() && navigation.goBack();
59
59
  return;
60
60
  }
61
- navigation.navigate('BottomTab');
61
+ navigation.navigate('BusinessList');
62
+ return true
62
63
  }
63
64
 
64
65
  const handleGoToOrderDetails = (uuid: any) => {
@@ -71,6 +72,13 @@ export const MultiOrdersDetailsUI = (props: any) => {
71
72
  }
72
73
  }, [error])
73
74
 
75
+ useEffect(() => {
76
+ BackHandler.addEventListener('hardwareBackPress', handleArrowBack)
77
+ return () => {
78
+ BackHandler.removeEventListener('hardwareBackPress', handleArrowBack)
79
+ }
80
+ }, [])
81
+
74
82
  return (
75
83
  <OrdersDetailsContainer keyboardShouldPersistTaps="handled" contentContainerStyle={{ paddingHorizontal: 40 }}>
76
84
  <View style={{ flexDirection: 'row' }}>
@@ -78,7 +86,7 @@ export const MultiOrdersDetailsUI = (props: any) => {
78
86
  imgLeftSrc={theme.images.general.arrow_left}
79
87
  imgRightSrc={null}
80
88
  style={styles.btnBackArrow}
81
- onClick={() => handleBackNavigation()}
89
+ onClick={() => handleArrowBack()}
82
90
  imgLeftStyle={{ tintColor: theme.colors.textNormal, width: 16 }}
83
91
  />
84
92
  </View>
@@ -22,7 +22,10 @@ export const SearchBar = (props: any) => {
22
22
  isDisabled,
23
23
  iconCustomRight,
24
24
  onSubmitEditing,
25
- blurOnSubmit
25
+ blurOnSubmit,
26
+ inputContainerStyles,
27
+ containerStyles,
28
+ hideIcon
26
29
  } = props
27
30
 
28
31
  const theme = useTheme();
@@ -77,13 +80,13 @@ export const SearchBar = (props: any) => {
77
80
  }
78
81
 
79
82
  return (
80
- <Pressable style={[styles.container, { height: height }]}>
83
+ <Pressable style={[styles.container, containerStyles, { height: height }]}>
81
84
  <OInput
82
85
  value={searchValue}
83
86
  onChange={onChangeSearch}
84
- style={styles.inputStyle}
87
+ style={{...styles.inputStyle, ...inputContainerStyles}}
85
88
  placeholder={placeholder}
86
- icon={theme.images.general.search}
89
+ icon={!hideIcon && theme.images.general.search}
87
90
  isDisabled={isDisabled}
88
91
  iconStyle={{ width: 12 }}
89
92
  returnKeyType='done'