ordering-ui-react-native 0.15.24 → 0.15.25

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.15.24",
3
+ "version": "0.15.25",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -71,10 +71,11 @@
71
71
  "react-native-background-timer": "^2.4.1",
72
72
  "react-native-bootsplash": "^3.2.3",
73
73
  "react-native-calendar-picker": "^7.1.2",
74
- "react-native-calendar-strip": "^2.2.1",
74
+ "react-native-calendar-strip": "^2.2.1",
75
75
  "react-native-color-matrix-image-filters": "^5.2.10",
76
76
  "react-native-country-picker-modal": "^2.0.0",
77
77
  "react-native-credit-card-input": "^0.4.1",
78
+ "react-native-device-info": "^8.7.1",
78
79
  "react-native-document-picker": "^5.2.0",
79
80
  "react-native-elements": "^3.0.0-alpha.1",
80
81
  "react-native-fast-image": "^8.3.3",
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react'
2
- import { StyleSheet, View, ScrollView, TouchableOpacity, Dimensions } from 'react-native'
2
+ import { StyleSheet, View, ScrollView, TouchableOpacity, Dimensions, Platform, PlatformIOSStatic } 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
 
@@ -8,6 +8,7 @@ import { OIcon, OText, OModal } from '../shared'
8
8
  import { BusinessTypeFilterParams } from '../../types'
9
9
  import { useTheme } from 'styled-components/native'
10
10
  import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons';
11
+ import DeviceInfo from 'react-native-device-info';
11
12
 
12
13
  const windowWidth = Dimensions.get('window').width;
13
14
 
@@ -18,6 +19,10 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
18
19
  handleChangeBusinessType,
19
20
  } = props;
20
21
 
22
+ const platformIOS = Platform as PlatformIOSStatic
23
+ const isIpad = platformIOS.isPad
24
+ const isTablet = DeviceInfo.isTablet();
25
+
21
26
  const theme = useTheme();
22
27
  const [, t] = useLanguage();
23
28
  const [isOpenAllCategories, setIsOpenAllCategories] = useState(false)
@@ -122,7 +127,9 @@ export const BusinessTypeFilterUI = (props: BusinessTypeFilterParams) => {
122
127
  {t('BUSINESS_CATEGORIES', 'Business Categories')}
123
128
  </OText>
124
129
  </BusinessCategoriesTitle>
125
- <BusinessCategories>
130
+ <BusinessCategories
131
+ mt={(isIpad || isTablet) ? 65 : null}
132
+ >
126
133
  {typesState?.types.slice(0, 3).map((type: any) => (
127
134
  <RenderTypes
128
135
  key={type.id}
@@ -18,7 +18,7 @@ export const BusinessCategories = styled.View`
18
18
  display: flex;
19
19
  flex-direction: row;
20
20
  justify-content: space-between;
21
- margin: 10px 0px;
21
+ margin: ${(props: any) => props.mt ?? 10}px 0px 10px;
22
22
  width: 100%;
23
23
  `
24
24
  export const Category = styled.View`