ordering-ui-react-native 0.17.27-release → 0.17.28-release

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.17.27-release",
3
+ "version": "0.17.28-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -9,7 +9,6 @@ const TitleWrapper = styled.View`
9
9
  padding-horizontal: 10px;
10
10
  `
11
11
  const TitleTopWrapper = styled.View`
12
- flex: 1;
13
12
  flex-direction: row;
14
13
  align-items: center;
15
14
  `
@@ -17,8 +16,10 @@ const TitleTopWrapper = styled.View`
17
16
  const btnBackArrow = {
18
17
  borderWidth: 0,
19
18
  backgroundColor: '#FFF',
20
- borderColor: '#FFF',
21
- shadowColor: '#FFF'
19
+ borderColor: '#fff',
20
+ shadowColor: '#FFF',
21
+ paddingLeft: 30,
22
+ paddingRight: 30
22
23
  }
23
24
 
24
25
  interface Props {
@@ -42,6 +43,7 @@ interface Props {
42
43
  paddingTop?: number,
43
44
  isVertical?: boolean,
44
45
  noMargin?: any
46
+ hideArrowLeft?: boolean
45
47
  }
46
48
 
47
49
  const NavBar = (props: Props) => {
@@ -52,8 +54,6 @@ const NavBar = (props: Props) => {
52
54
  background-color: ${theme.colors.white};
53
55
  padding: 10px 20px 20px 0px;
54
56
  flex-direction: row;
55
- justify-content: center;
56
- align-items: center;
57
57
  position: relative;
58
58
  `
59
59
 
@@ -62,13 +62,18 @@ const NavBar = (props: Props) => {
62
62
  }
63
63
  return (
64
64
  <Wrapper style={{ paddingTop: props.paddingTop, ...{ flexDirection: props.isVertical ? 'column' : 'row', alignItems: props.isVertical ? 'flex-start' : 'center' }, ...props.style }}>
65
- <OButton
66
- imgLeftSrc={theme.images.general.arrow_left}
67
- imgLeftStyle={{ width: 26 }}
68
- imgRightSrc={null}
69
- style={{ ...btnBackArrow, ...props.btnStyle, ...props.isVertical ? (I18nManager.isRTL ? { paddingRight: 0 } : { paddingLeft: 0 }) : {} }}
70
- onClick={props?.onActionLeft}
71
- />
65
+ {!props.hideArrowLeft && (
66
+ <OButton
67
+ iconProps={{
68
+ name: 'arrowleft',
69
+ size: 26
70
+ }}
71
+ icon={AntDesignIcon}
72
+ imgRightSrc={null}
73
+ style={{ ...btnBackArrow, ...props.btnStyle, ...props.isVertical ? (I18nManager.isRTL ? { paddingRight: 0 } : { paddingLeft: 0 }) : {} }}
74
+ onClick={props?.onActionLeft}
75
+ />
76
+ )}
72
77
  <TitleTopWrapper>
73
78
  {props.withIcon
74
79
  ? (
@@ -86,7 +91,7 @@ const NavBar = (props: Props) => {
86
91
  }
87
92
  <TitleWrapper style={{ ...{ paddingHorizontal: props.isVertical ? 0 : 10 }, ...props.titleWrapStyle }}>
88
93
  <OText
89
- size={24}
94
+ size={20}
90
95
  lineHeight={36}
91
96
  weight={Platform.OS === 'ios' ? '600' : 'bold'}
92
97
  style={
@@ -152,7 +152,7 @@ const OrderProgressUI = (props: any) => {
152
152
  </OrderInfoWrapper>
153
153
  <View style={{ flex: 1 }}>
154
154
  <ProgressContentWrapper>
155
- <ProgressBar style={{ width: getOrderStatus(lastOrder.status)?.percentage ? `${getOrderStatus(lastOrder.status)?.percentage}%` : '0%' }} />
155
+ <ProgressBar style={{ width: getOrderStatus(lastOrder.status)?.percentage ? `${(getOrderStatus(lastOrder.status) as any).percentage * 100}%` : '0%' }} />
156
156
  </ProgressContentWrapper>
157
157
  <ProgressTextWrapper>
158
158
  <OText size={12} style={{ width: '50%' }}>{getOrderStatus(lastOrder.status)?.value}</OText>
@@ -3,6 +3,7 @@ import { Pressable, StyleSheet, View, ScrollView, TouchableOpacity, Platform } f
3
3
  import { useTheme } from 'styled-components/native'
4
4
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
5
5
  import FastImage from 'react-native-fast-image'
6
+ import NavBar from '../NavBar'
6
7
  import {
7
8
  WalletList,
8
9
  useLanguage,
@@ -119,51 +120,29 @@ const WalletsUI = (props: any) => {
119
120
 
120
121
  return (
121
122
  <>
122
- <Container>
123
+ <Container
124
+ pdng={Platform.OS === 'ios' ? '10px' : '0'}
125
+ >
123
126
  <Header>
124
127
  <View style={{
125
128
  ...{
126
129
  width: '100%',
127
130
  display: 'flex',
128
- flexDirection: 'row',
129
- alignItems: 'center',
130
- marginTop: 30,
131
- justifyContent: 'space-between',
132
- alignContent: 'center'
131
+ flexDirection: hideWalletsTheme ? 'column' : 'row',
132
+ justifyContent: hideWalletsTheme ? 'flex-start' : 'space-between',
133
+ alignItems: hideWalletsTheme ? 'flex-start' : 'center',
134
+ marginTop: hideWalletsTheme ? 0 : 10,
133
135
  },
134
136
  }}>
135
- {(!props.hideBackBtn || !hideWalletsTheme) && !isChewLayout && (
136
- <OButton
137
- imgLeftStyle={{ width: 18 }}
138
- imgRightSrc={null}
139
- style={{
140
- borderWidth: 0,
141
- width: 26,
142
- height: 26,
143
- backgroundColor: '#FFF',
144
- borderColor: '#FFF',
145
- shadowColor: '#FFF',
146
- paddingLeft: 0,
147
- paddingRight: 0,
148
- }}
149
- onClick={goToBack}
150
- icon={AntDesignIcon}
151
- iconProps={{
152
- name: 'arrowleft',
153
- size: 26
154
- }}
155
- />
156
- )}
157
- <OText
158
- size={20}
159
- style={{
160
- marginLeft: (!props.hideBackBtn || !hideWalletsTheme) && !isChewLayout ? 40 : 0,
161
- color: theme.colors.textNormal,
162
- }}
163
- weight={Platform.OS === 'ios' ? '600' : 'bold'}
164
- >
165
- {t('WALLETS', 'Wallets')}
166
- </OText>
137
+ <NavBar
138
+ title={t('WALLETS', 'Wallets')}
139
+ titleAlign={'center'}
140
+ onActionLeft={goToBack}
141
+ showCall={false}
142
+ paddingTop={10}
143
+ btnStyle={{ paddingLeft: 0 }}
144
+ hideArrowLeft={!hideWalletsTheme}
145
+ />
167
146
  {isChewLayout && (
168
147
  <OButton
169
148
  text={t('WALLET_HISTORY', 'Wallet history')}
@@ -172,7 +151,7 @@ const WalletsUI = (props: any) => {
172
151
  imgRightSrc={null}
173
152
  textStyle={{ fontSize: 12, color: theme.colors.disabled }}
174
153
  onClick={() => setOpenHistory(true)}
175
- style={{ borderRadius: 8, height: 40 }}
154
+ style={{ borderRadius: 8, height: 40, width: hideWalletsTheme ? '100%' : 150, marginTop: hideWalletsTheme ? 10 : 0 }}
176
155
  />
177
156
  )}
178
157
  </View>
@@ -1,13 +1,12 @@
1
1
  import styled from 'styled-components/native'
2
2
 
3
3
  export const Container = styled.View`
4
- display: flex;
5
- flex-direction: column;
4
+ padding-horizontal: 20px;
5
+ padding-bottom: 20px;
6
+ padding-top: ${(props: any) => props.pdng};
6
7
  `
7
8
  export const Header = styled.View`
8
9
  flex-direction: row;
9
- align-items: center;
10
- justify-content: space-between;
11
10
  `
12
11
  export const SectionContent = styled.View`
13
12
  width: 100%;