ordering-ui-react-native 0.15.30 → 0.15.31

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.30",
3
+ "version": "0.15.31",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -541,7 +541,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
541
541
  </TabsContainer>
542
542
  </ScrollView>
543
543
  </FiltersTab>
544
- <View style={{ flex: 1, minHeight: HEIGHT_SCREEN - 250 }}>
544
+ <View style={{ flex: 1, minHeight: HEIGHT_SCREEN - 450 }}>
545
545
  {currentTabSelected !== 'logisticOrders' && (
546
546
  <View
547
547
  style={{
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { StyleSheet, TouchableOpacity, View } from 'react-native';
2
+ import { StyleSheet, TouchableOpacity, View, Platform, PlatformIOSStatic } from 'react-native';
3
3
  import { useTheme } from 'styled-components/native';
4
4
  import moment from 'moment'
5
5
  import { useLanguage, useUtils } from 'ordering-components/native';
@@ -9,6 +9,7 @@ import {
9
9
  } from './styles';
10
10
  import EntypoIcon from 'react-native-vector-icons/Entypo'
11
11
  import { DeviceOrientationMethods } from '../../../../../src/hooks/DeviceOrientation'
12
+ import DeviceInfo from 'react-native-device-info';
12
13
 
13
14
  const { useDeviceOrientation, PORTRAIT } = DeviceOrientationMethods
14
15
 
@@ -32,6 +33,10 @@ export const PreviousOrders = (props: any) => {
32
33
 
33
34
  const IS_PORTRAIT = orientationState.orientation === PORTRAIT
34
35
 
36
+ const platformIOS = Platform as PlatformIOSStatic
37
+ const isIpad = platformIOS.isPad
38
+ const isTablet = DeviceInfo.isTablet();
39
+
35
40
  const handlePressOrder = (order: any) => {
36
41
  if (order?.locked && isLogisticOrder) return
37
42
  handleClickOrder && handleClickOrder(order)
@@ -46,8 +51,8 @@ export const PreviousOrders = (props: any) => {
46
51
  const styles = StyleSheet.create({
47
52
  cardButton: {
48
53
  flex: 1,
49
- paddingVertical: 20,
50
- marginBottom: IS_PORTRAIT ? 20 : 0,
54
+ paddingVertical: (isIpad || isTablet) ? 20 : 0,
55
+ marginBottom: IS_PORTRAIT ? 25 : 0,
51
56
  marginLeft: 3,
52
57
  },
53
58
  icon: {