ordering-ui-react-native 0.11.22 → 0.11.26

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.
Files changed (25) hide show
  1. package/package.json +1 -1
  2. package/src/components/BusinessTypeFilter/index.tsx +155 -105
  3. package/themes/business/src/components/OrdersOption/index.tsx +2 -0
  4. package/themes/business/src/components/PreviousOrders/index.tsx +13 -4
  5. package/themes/business/src/components/PreviousOrders/styles.tsx +6 -0
  6. package/themes/business/src/types/index.tsx +1 -0
  7. package/themes/doordash/src/components/BusinessTypeFilter/index.tsx +152 -84
  8. package/themes/doordash/src/components/BusinessTypeFilter/styles.tsx +1 -2
  9. package/themes/kiosk/src/components/BusinessMenu/index.tsx +1 -1
  10. package/themes/kiosk/src/components/BusinessProductsListing/index.tsx +6 -14
  11. package/themes/kiosk/src/components/Cart/index.tsx +75 -60
  12. package/themes/kiosk/src/components/Cart/styles.tsx +19 -1
  13. package/themes/kiosk/src/components/CategoriesMenu/index.tsx +6 -15
  14. package/themes/kiosk/src/components/LoginForm/index.tsx +1 -8
  15. package/themes/kiosk/src/components/PaymentOptions/index.tsx +2 -1
  16. package/themes/kiosk/src/components/shared/OCard.tsx +1 -1
  17. package/themes/kiosk/src/components/shared/OInput.tsx +4 -0
  18. package/themes/original/src/components/BusinessTypeFilter/index.tsx +118 -44
  19. package/themes/original/src/components/BusinessTypeFilter/styles.tsx +4 -4
  20. package/themes/original/src/components/BusinessesListing/index.tsx +3 -0
  21. package/themes/original/src/components/HighestRatedBusinesses/index.tsx +122 -0
  22. package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +7 -0
  23. package/themes/original/src/types/index.tsx +4 -0
  24. package/themes/uber-eats/src/components/BusinessTypeFilter/index.tsx +151 -76
  25. package/themes/uber-eats/src/components/BusinessTypeFilter/styles.tsx +0 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.11.22",
3
+ "version": "0.11.26",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -1,14 +1,14 @@
1
- import React from 'react'
1
+ import React, { useState } from 'react'
2
2
  import { StyleSheet, View, ScrollView, TouchableOpacity, Dimensions } from 'react-native'
3
3
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder'
4
4
  import { BusinessTypeFilter as BusinessTypeFilterController, useLanguage } from 'ordering-components/native'
5
5
 
6
6
  import { BusinessCategoriesTitle, BusinessCategories, Category, BCContainer } from './styles'
7
- import { OIcon, OText } from '../shared'
7
+ import { OIcon, OText, OModal } from '../shared'
8
8
  import { BusinessTypeFilterParams } from '../../types'
9
9
  import { useTheme } from 'styled-components/native'
10
+ import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons';
10
11
 
11
- import Carousel from 'react-native-snap-carousel';
12
12
  const windowWidth = Dimensions.get('window').width;
13
13
 
14
14
  export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
@@ -20,122 +20,172 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
20
20
 
21
21
  const theme = useTheme();
22
22
  const [, t] = useLanguage();
23
+ const [isOpenAllCategories, setIsOpenAllCategories] = useState(false)
23
24
 
24
- const renderTypes = ({ item }: any) => {
25
+ const styles = StyleSheet.create({
26
+ icons: {
27
+ padding: 10
28
+ },
29
+ logo: {
30
+ width: isOpenAllCategories ? windowWidth / 3 - 27 : windowWidth / 4 - 20,
31
+ height: isOpenAllCategories ? windowWidth / 3 - 27 : windowWidth / 4 - 20,
32
+ marginBottom: 15,
33
+ borderRadius: 8,
34
+ justifyContent: 'center',
35
+ alignItems: 'center',
36
+ },
37
+ categoryStyle: {
38
+ width: isOpenAllCategories ? windowWidth / 3 - 27 : windowWidth / 4 - 20,
39
+ height: 150,
40
+ flexDirection: 'column',
41
+ justifyContent: 'center',
42
+ alignItems: 'center',
43
+ marginHorizontal: isOpenAllCategories ? 10 : 0,
44
+ marginBottom: isOpenAllCategories ? 40 : 0
45
+ },
46
+ allCategoriesContainer : {
47
+ paddingHorizontal: 10,
48
+ paddingVertical: 30
49
+ },
50
+ allCategoriesWrapper: {
51
+ flexDirection: 'row',
52
+ flexWrap: 'wrap',
53
+ }
54
+ })
55
+
56
+ const RenderTypes = ({ item }: any ) => {
25
57
  return (
26
58
  <TouchableOpacity
27
- key={item.id}
28
- onPress={() => handleChangeBusinessType(item.id)}
59
+ style={styles.categoryStyle}
60
+ onPress={() => {
61
+ handleChangeBusinessType(item.id)
62
+ isOpenAllCategories && setIsOpenAllCategories(false)
63
+ }}
29
64
  >
30
- <Category>
31
- {item.image ? (
32
- <OIcon
33
- url={item.image}
34
- style={styles.logo}
35
- />
36
- ) : (
37
- <OIcon
38
- src={theme.images.categories.all}
39
- style={styles.logo}
40
- />
41
- )}
42
- <OText
43
- style={{ textAlign: 'center' }}
44
- size={20}
45
- color={currentTypeSelected === item.id ? theme.colors.primary : theme.colors.textSecondary}
46
- numberOfLines={1}
47
- ellipsizeMode='tail'
48
- >
49
- {t(`BUSINESS_TYPE_${item.name.replace(/\s/g, '_').toUpperCase()}`, item.name)}
50
- </OText>
51
- </Category>
65
+ {item.image ? (
66
+ <OIcon
67
+ url={item.image}
68
+ style={styles.logo}
69
+ />
70
+ ) : (
71
+ <OIcon
72
+ src={theme.images.categories.all}
73
+ style={styles.logo}
74
+ />
75
+ )}
76
+ <OText
77
+ style={{ textAlign: 'center' }}
78
+ size={14}
79
+ color={currentTypeSelected === item.id ? theme.colors.primary : theme.colors.textSecondary}
80
+ numberOfLines={1}
81
+ ellipsizeMode='tail'
82
+ >
83
+ {t(`BUSINESS_TYPE_${item.name.replace(/\s/g, '_').toUpperCase()}`, item.name)}
84
+ </OText>
52
85
  </TouchableOpacity>
53
86
  )
54
87
  }
55
88
 
56
- let _carousel: Carousel<any> | null;
57
-
58
- const typeSelectedIndex = typesState?.types?.length > 0
59
- ? typesState?.types.findIndex((type: any) => type.id === (currentTypeSelected ?? 0))
60
- : 0
61
-
62
89
  return (
63
- <BCContainer>
64
- {typesState?.loading && (
65
- <View>
66
- <Placeholder
67
- style={{ marginVertical: 10 }}
68
- Animation={Fade}
69
- >
70
- <ScrollView
71
- horizontal
72
- showsVerticalScrollIndicator={false}
73
- showsHorizontalScrollIndicator={false}
90
+ <>
91
+ <BCContainer>
92
+ {typesState?.loading && (
93
+ <View>
94
+ <Placeholder
95
+ style={{ marginVertical: 10 }}
96
+ Animation={Fade}
74
97
  >
75
- {[...Array(4)].map((_, i) => (
76
- <View key={i} style={{ width: 80, borderRadius: 10, marginRight: 15 }}>
77
- <PlaceholderLine
78
- height={80}
79
- noMargin
80
- />
81
- </View>
98
+ <ScrollView
99
+ horizontal
100
+ showsVerticalScrollIndicator={false}
101
+ showsHorizontalScrollIndicator={false}
102
+ >
103
+ {[...Array(4)].map((_, i) => (
104
+ <View key={i} style={{ width: 80, borderRadius: 8, marginRight: 15 }}>
105
+ <PlaceholderLine
106
+ height={80}
107
+ noMargin
108
+ />
109
+ </View>
110
+ ))}
111
+ </ScrollView>
112
+ </Placeholder>
113
+ </View>
114
+ )}
115
+ {!typesState?.loading && !typesState?.error && typesState?.types && typesState?.types.length > 0 && (
116
+ <>
117
+ <BusinessCategoriesTitle>
118
+ <OText
119
+ size={16}
120
+ color={theme.colors.textSecondary}
121
+ >
122
+ {t('BUSINESS_CATEGORIES', 'Business Categories')}
123
+ </OText>
124
+ </BusinessCategoriesTitle>
125
+ <BusinessCategories>
126
+ {typesState?.types.slice(0, 3).map((type: any) => (
127
+ <RenderTypes
128
+ key={type.id}
129
+ item={type}
130
+ />
82
131
  ))}
83
- </ScrollView>
84
- </Placeholder>
85
- </View>
86
- )}
87
- {!typesState?.loading && !typesState?.error && typesState?.types && typesState?.types.length > 0 && (
88
- <>
89
- <BusinessCategoriesTitle>
90
- <OText
91
- size={16}
92
- color={theme.colors.textSecondary}
93
- >
94
- {t('BUSINESS_CATEGORIES', 'Business Categories')}
95
- </OText>
96
- </BusinessCategoriesTitle>
97
- <BusinessCategories>
98
- <Carousel
99
- keyExtractor={(item: any) => item.name}
100
- ref={(c: any) => { _carousel = c }}
101
- data={typesState?.types || []}
102
- renderItem={renderTypes}
103
- sliderWidth={windowWidth}
104
- itemWidth={100}
105
- alwaysBounceHorizontal
106
- layout={'default'}
107
- slideStyle={{
108
- width: 100,
109
- marginRight: 15,
110
- }}
111
- activeSlideOffset={15}
112
- inactiveSlideScale={1}
113
- snapToAlignment="start"
114
- activeSlideAlignment="start"
115
- inactiveSlideOpacity={1}
116
- firstItem={typeSelectedIndex ?? 0}
117
- />
118
- </BusinessCategories>
119
- </>
120
- )}
121
- </BCContainer>
132
+ {typesState?.types.length > 3 && (
133
+ <TouchableOpacity
134
+ style={styles.categoryStyle}
135
+ onPress={() => setIsOpenAllCategories(true)}
136
+ >
137
+ <View
138
+ style={{ ...styles.logo, backgroundColor: theme.colors.lightGray }}
139
+ >
140
+ <MaterialIcon
141
+ name='dots-horizontal'
142
+ size={32}
143
+ color={theme.colors.black}
144
+ />
145
+ </View>
146
+ <OText
147
+ style={{ textAlign: 'center' }}
148
+ size={14}
149
+ color={theme.colors.textSecondary}
150
+ numberOfLines={1}
151
+ ellipsizeMode='tail'
152
+ >
153
+ {t('SEE_ALL', 'See all')}
154
+ </OText>
155
+ </TouchableOpacity>
156
+ )}
157
+ </BusinessCategories>
158
+ </>
159
+ )}
160
+ </BCContainer>
161
+ <OModal
162
+ open={isOpenAllCategories}
163
+ onClose={() => setIsOpenAllCategories(false)}
164
+ entireModal
165
+ >
166
+ <ScrollView style={styles.allCategoriesContainer}>
167
+ <OText
168
+ size={20}
169
+ mBottom={30}
170
+ color={theme.colors.textSecondary}
171
+ style={{ paddingHorizontal: 10 }}
172
+ >
173
+ {t('ALL_CATEGORIES', 'All categories')}
174
+ </OText>
175
+ <View style={styles.allCategoriesWrapper}>
176
+ {typesState?.types.map((type: any) => (
177
+ <RenderTypes
178
+ key={type.id}
179
+ item={type}
180
+ />
181
+ ))}
182
+ </View>
183
+ </ScrollView>
184
+ </OModal>
185
+ </>
122
186
  )
123
187
  }
124
188
 
125
- const styles = StyleSheet.create({
126
- icons: {
127
- padding: 10
128
- },
129
- logo: {
130
- width: 75,
131
- height: 75,
132
- marginBottom: 15,
133
- borderRadius: 25,
134
- justifyContent: 'center',
135
- alignItems: 'center',
136
- },
137
- })
138
-
139
189
  export const BusinessTypeFilter = (props: BusinessTypeFilterParams) => {
140
190
  const businessTypeFilterProps = {
141
191
  ...props,
@@ -47,6 +47,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
47
47
  loadOrders,
48
48
  loadMoreOrders,
49
49
  onNavigationRedirect,
50
+ handleClickOrder
50
51
  } = props;
51
52
 
52
53
  const theme = useTheme();
@@ -328,6 +329,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
328
329
  orders={currentOrdersGroup.orders}
329
330
  onNavigationRedirect={onNavigationRedirect}
330
331
  getOrderStatus={getOrderStatus}
332
+ handleClickOrder={handleClickOrder}
331
333
  />
332
334
  )}
333
335
 
@@ -3,15 +3,17 @@ import { StyleSheet, TouchableOpacity } from 'react-native';
3
3
  import { useTheme } from 'styled-components/native';
4
4
  import { useLanguage, useUtils } from 'ordering-components/native';
5
5
  import { OIcon, OText } from '../shared';
6
- import { Card, Logo, Information, MyOrderOptions } from './styles';
6
+ import { Card, Logo, Information, MyOrderOptions, NotificationIcon } from './styles';
7
+ import EntypoIcon from 'react-native-vector-icons/Entypo'
7
8
 
8
9
  export const PreviousOrders = (props: any) => {
9
- const { orders, onNavigationRedirect, getOrderStatus } = props;
10
+ const { orders, onNavigationRedirect, getOrderStatus, handleClickOrder } = props;
10
11
  const [, t] = useLanguage();
11
12
  const [{ parseDate, optimizeImage }] = useUtils();
12
13
  const theme = useTheme();
13
14
 
14
15
  const handlePressOrder = (order: any) => {
16
+ handleClickOrder && handleClickOrder(order)
15
17
  onNavigationRedirect &&
16
18
  onNavigationRedirect('OrderDetails', { order: order });
17
19
  };
@@ -96,12 +98,19 @@ export const PreviousOrders = (props: any) => {
96
98
  />
97
99
  </Logo>
98
100
  )}
99
-
100
101
  <Information>
101
102
  <OText numberOfLines={1} style={styles.title}>
102
103
  {order.business?.name}
103
104
  </OText>
104
-
105
+ {order?.showNotification && (
106
+ <NotificationIcon>
107
+ <EntypoIcon
108
+ name="dot-single"
109
+ size={32}
110
+ color={theme.colors.primary}
111
+ />
112
+ </NotificationIcon>
113
+ )}
105
114
  <OText
106
115
  style={styles.date}
107
116
  numberOfLines={1}
@@ -13,6 +13,7 @@ export const Logo = styled.View`
13
13
  `;
14
14
 
15
15
  export const Information = styled.View`
16
+ position: relative;
16
17
  justify-content: flex-start;
17
18
  margin-horizontal: 10px;
18
19
  flex: 1;
@@ -23,3 +24,8 @@ export const MyOrderOptions = styled.View`
23
24
  flex-direction: column;
24
25
  justify-content: space-between;
25
26
  `;
27
+
28
+ export const NotificationIcon = styled.View`
29
+ position: absolute;
30
+ left: 90%;
31
+ `
@@ -275,6 +275,7 @@ export interface OrdersOptionParams {
275
275
  ordersGroup?: any;
276
276
  setOrdersGroup?: any;
277
277
  setCurrentFilters?: any;
278
+ handleClickOrder?: any;
278
279
  }
279
280
  export interface ActiveOrdersParams {
280
281
  orders?: any;
@@ -1,13 +1,15 @@
1
- import React from 'react'
1
+ import React, { useState } from 'react'
2
2
  import { StyleSheet, FlatList, View, ScrollView, TouchableOpacity } from 'react-native'
3
3
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder'
4
4
  import { BusinessTypeFilter as BusinessTypeFilterController, useLanguage } from 'ordering-components/native'
5
5
 
6
- import { BusinessCategoriesTitle, BusinessCategories, Category, BCContainer } from './styles'
6
+ import { BusinessCategories, Category, BCContainer } from './styles'
7
7
  import { OIcon, OText } from '../shared'
8
+ import { OModal } from '../../../../../src/components/shared'
8
9
  import { useTheme } from 'styled-components/native'
9
10
  import { BusinessTypeFilterParams } from '../../types'
10
11
  import { useWindowDimensions } from 'react-native'
12
+ import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons';
11
13
 
12
14
  export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
13
15
  const {
@@ -18,103 +20,169 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
18
20
 
19
21
  const theme = useTheme();
20
22
  const [, t] = useLanguage();
21
- const { width } = useWindowDimensions();
23
+ const { width, height } = useWindowDimensions();
24
+ const [isOpenAllCategories, setIsOpenAllCategories] = useState(false)
22
25
 
23
- const renderTypes = ({ item }: any) => {
26
+ const styles = StyleSheet.create({
27
+ icons: {
28
+ padding: 10
29
+ },
30
+ logo: {
31
+ width: isOpenAllCategories ? width / 3 - 27 : width / 4 - 30,
32
+ height: isOpenAllCategories ? width / 3 - 27 : width / 4 - 30,
33
+ marginBottom: 15,
34
+ borderRadius: 8,
35
+ justifyContent: 'center',
36
+ alignItems: 'center',
37
+ },
38
+ categoryStyle: {
39
+ width: isOpenAllCategories ? width / 3 - 27 : width / 4 - 30,
40
+ height: 120,
41
+ flexDirection: 'column',
42
+ justifyContent: 'center',
43
+ alignItems: 'center',
44
+ marginHorizontal: isOpenAllCategories ? 10 : 0,
45
+ marginBottom: isOpenAllCategories ? 40 : 0
46
+ },
47
+ allCategoriesContainer : {
48
+ paddingHorizontal: 10,
49
+ paddingVertical: 30,
50
+ height: height,
51
+ backgroundColor: 'white',
52
+ flex: 1
53
+ },
54
+ allCategoriesWrapper: {
55
+ flexDirection: 'row',
56
+ flexWrap: 'wrap',
57
+ }
58
+ })
59
+
60
+ const RenderTypes = ({ item }: any) => {
24
61
  return (
25
62
  <TouchableOpacity
26
63
  key={item.id}
27
- onPress={() => handleChangeBusinessType(item.id)}
64
+ style={styles.categoryStyle}
65
+ onPress={() => {
66
+ handleChangeBusinessType(item.id)
67
+ isOpenAllCategories && setIsOpenAllCategories(false)
68
+ }}
28
69
  >
29
- <Category>
30
- {item.image ? (
31
- <OIcon
32
- url={item.image}
33
- style={styles.logo}
34
- />
35
- ) : (
36
- <OIcon
37
- src={theme.images.categories.all}
38
- style={styles.logo}
39
- />
40
- )}
41
- <OText
42
- style={{ textAlign: 'center' }}
43
- size={12}
44
- weight={'400'}
45
- color={currentTypeSelected === item.id ? theme.colors.textPrimary : theme.colors.textSecondary}
46
- >
47
- {t(`BUSINESS_TYPE_${item.name.replace(/\s/g, '_').toUpperCase()}`, item.name)}
48
- </OText>
49
- </Category>
70
+ {item.image ? (
71
+ <OIcon
72
+ url={item.image}
73
+ style={styles.logo}
74
+ />
75
+ ) : (
76
+ <OIcon
77
+ src={theme.images.categories.all}
78
+ style={styles.logo}
79
+ />
80
+ )}
81
+ <OText
82
+ style={{ textAlign: 'center' }}
83
+ size={12}
84
+ weight={'400'}
85
+ color={currentTypeSelected === item.id ? theme.colors.textPrimary : theme.colors.textSecondary}
86
+ numberOfLines={1}
87
+ >
88
+ {t(`BUSINESS_TYPE_${item.name.replace(/\s/g, '_').toUpperCase()}`, item.name)}
89
+ </OText>
50
90
  </TouchableOpacity>
51
91
  )
52
92
  }
53
93
 
54
94
  return (
55
- <BCContainer style={{ marginStart: -40, width: width }}>
56
- {typesState?.loading && (
57
- <View>
58
- <Placeholder
59
- style={{ marginVertical: 10 }}
60
- Animation={Fade}
61
- >
62
- <ScrollView
63
- horizontal
64
- showsVerticalScrollIndicator={false}
65
- showsHorizontalScrollIndicator={false}
95
+ <>
96
+ <BCContainer>
97
+ {typesState?.loading && (
98
+ <View>
99
+ <Placeholder
100
+ style={{ marginVertical: 10 }}
101
+ Animation={Fade}
66
102
  >
67
- {[...Array(4)].map((_, i) => (
68
- <View key={i} style={{ width: 80, borderRadius: 10, marginRight: 15 }}>
69
- <PlaceholderLine
70
- height={80}
71
- noMargin
72
- />
73
- </View>
103
+ <ScrollView
104
+ horizontal
105
+ showsVerticalScrollIndicator={false}
106
+ showsHorizontalScrollIndicator={false}
107
+ >
108
+ {[...Array(4)].map((_, i) => (
109
+ <View key={i} style={{ width: 80, borderRadius: 8, marginRight: 15 }}>
110
+ <PlaceholderLine
111
+ height={80}
112
+ noMargin
113
+ />
114
+ </View>
115
+ ))}
116
+ </ScrollView>
117
+ </Placeholder>
118
+ </View>
119
+ )}
120
+ {!typesState?.loading && !typesState?.error && typesState?.types && typesState?.types.length > 0 && (
121
+ <>
122
+ <BusinessCategories>
123
+ {typesState?.types.slice(0, 3).map((type: any) => (
124
+ <RenderTypes
125
+ key={type.id}
126
+ item={type}
127
+ />
74
128
  ))}
75
- </ScrollView>
76
- </Placeholder>
77
- </View>
78
- )}
79
- {!typesState?.loading && !typesState?.error && typesState?.types && typesState?.types.length > 0 && (
80
- <>
81
- {/* <BusinessCategoriesTitle>
82
- <OText
83
- size={16}
84
- color={theme.colors.textSecondary}
85
- >
86
- {t('BUSINESS_CATEGORIES', 'Business Categories')}
87
- </OText>
88
- </BusinessCategoriesTitle> */}
89
- <BusinessCategories>
90
- <FlatList
91
- horizontal
92
- showsHorizontalScrollIndicator={false}
93
- data={typesState?.types}
94
- renderItem={renderTypes}
95
- keyExtractor={type => type.name}
96
- contentContainerStyle={{ paddingHorizontal: 40 }}
97
- />
98
- </BusinessCategories>
99
- </>
100
- )}
101
- </BCContainer>
129
+ {typesState?.types.length > 3 && (
130
+ <TouchableOpacity
131
+ style={styles.categoryStyle}
132
+ onPress={() => setIsOpenAllCategories(true)}
133
+ >
134
+ <View
135
+ style={{ ...styles.logo, backgroundColor: theme.colors.lightGray }}
136
+ >
137
+ <MaterialIcon
138
+ name='dots-horizontal'
139
+ size={32}
140
+ color={theme.colors.black}
141
+ />
142
+ </View>
143
+ <OText
144
+ style={{ textAlign: 'center' }}
145
+ size={12}
146
+ color={theme.colors.textSecondary}
147
+ numberOfLines={1}
148
+ ellipsizeMode='tail'
149
+ >
150
+ {t('SEE_ALL', 'See All')}
151
+ </OText>
152
+ </TouchableOpacity>
153
+ )}
154
+ </BusinessCategories>
155
+ </>
156
+ )}
157
+ </BCContainer>
158
+ <OModal
159
+ open={isOpenAllCategories}
160
+ onClose={() => setIsOpenAllCategories(false)}
161
+ entireModal
162
+ >
163
+ <ScrollView style={styles.allCategoriesContainer}>
164
+ <OText
165
+ size={20}
166
+ mBottom={30}
167
+ color={theme.colors.textSecondary}
168
+ style={{ paddingHorizontal: 10 }}
169
+ >
170
+ {t('ALL_CATEGORIES', 'All categories')}
171
+ </OText>
172
+ <View style={styles.allCategoriesWrapper}>
173
+ {typesState?.types.map((type: any) => (
174
+ <RenderTypes
175
+ key={type.id}
176
+ item={type}
177
+ />
178
+ ))}
179
+ </View>
180
+ </ScrollView>
181
+ </OModal>
182
+ </>
102
183
  )
103
184
  }
104
185
 
105
- const styles = StyleSheet.create({
106
- icons: {
107
- padding: 10
108
- },
109
- logo: {
110
- width: 52,
111
- height: 52,
112
- marginBottom: 7,
113
- justifyContent: 'center',
114
- alignItems: 'center',
115
- },
116
- })
117
-
118
186
  export const BusinessTypeFilter = (props: BusinessTypeFilterParams) => {
119
187
  const businessTypeFilterProps = {
120
188
  ...props,
@@ -5,7 +5,6 @@ export const BCContainer = styled.View`
5
5
  width: 100%;
6
6
  justify-content: flex-start;
7
7
  text-align: center;
8
- min-height: 140px;
9
8
  `
10
9
 
11
10
  export const BusinessCategoriesTitle = styled.View`
@@ -19,7 +18,7 @@ export const BusinessCategories = styled.View`
19
18
  display: flex;
20
19
  flex-direction: row;
21
20
  justify-content: space-between;
22
- margin: 30px 0px;
21
+ margin: 10px 0px;
23
22
  width: 100%;
24
23
  `
25
24
  export const Category = styled.View`