ordering-ui-react-native 0.21.41 → 0.21.42

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.21.41",
3
+ "version": "0.21.42",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -56,7 +56,7 @@ export const GiftCardUI = React.memo((props: any) => {
56
56
  <View style={style.actionWrapper}>
57
57
  <OButton
58
58
  onClick={() => setOpenModal('purchase')}
59
- text={t('PURCHASE_GIFT_CARD', 'Purchase gift card')}
59
+ text={t('PURCHASE', 'Purchase')}
60
60
  bgColor={theme.colors.primary}
61
61
  borderColor={theme.colors.primary}
62
62
  textStyle={{ color: 'white', fontSize: 13 }}
@@ -66,7 +66,7 @@ export const GiftCardUI = React.memo((props: any) => {
66
66
 
67
67
  <OButton
68
68
  onClick={() => setOpenModal('redeem')}
69
- text={t('REDEEM_GIFT_CARD', 'Redeem gift card')}
69
+ text={t('REDEEM', 'Redeem')}
70
70
  bgColor={theme.colors.lightPrimary}
71
71
  borderColor={theme.colors.lightPrimary}
72
72
  textStyle={{ color: theme.colors.primary, fontSize: 13 }}
@@ -79,13 +79,18 @@ export const GiftCardUI = React.memo((props: any) => {
79
79
  open={openModal === 'purchase'}
80
80
  onClose={() => setOpenModal(null)}
81
81
  entireModal
82
+ customClose
82
83
  >
83
- <PurchaseGiftCard handleCustomGoToCheckout={handleCustomGoToCheckout} />
84
+ <PurchaseGiftCard
85
+ handleCustomGoToCheckout={handleCustomGoToCheckout}
86
+ onClose={() => setOpenModal(null)}
87
+ />
84
88
  </OModal>
85
89
  <OModal
86
90
  open={openModal === 'redeem'}
87
91
  onClose={() => setOpenModal(null)}
88
92
  entireModal
93
+ customClose
89
94
  >
90
95
  <RedeemGiftCard
91
96
  onClose={() => setOpenModal(null)}
@@ -3,10 +3,11 @@ import {
3
3
  useLanguage,
4
4
  PurchaseGiftCard as PurchaseGiftCardController
5
5
  } from 'ordering-components/native'
6
- import { StyleSheet, View, TouchableOpacity, ScrollView } from 'react-native'
6
+ import { StyleSheet, View, TouchableOpacity, ScrollView, Platform } from 'react-native'
7
7
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
8
8
  import { useTheme } from 'styled-components/native';
9
9
  import { OText, OButton, OIcon } from '../../shared';
10
+ import AntDesignIcon from 'react-native-vector-icons/AntDesign'
10
11
 
11
12
  import {
12
13
  Container
@@ -17,7 +18,8 @@ const PurchaseGiftCardUI = (props: any) => {
17
18
  productsListState,
18
19
  selectedProduct,
19
20
  setSelectedProduct,
20
- handleAccept
21
+ handleAccept,
22
+ onClose
21
23
  } = props
22
24
 
23
25
  const theme = useTheme()
@@ -42,7 +44,38 @@ const PurchaseGiftCardUI = (props: any) => {
42
44
 
43
45
  return (
44
46
  <Container>
45
- <OText color={theme.colors.textNormal} weight='bold' size={20} mBottom={40}>{t('PURCHASE_GIFT_CARD', 'Purchase gift card')}</OText>
47
+ <View style={{
48
+ marginBottom: 40,
49
+ marginTop: Platform.OS === 'ios' ? 30 : 50,
50
+ display: 'flex',
51
+ flexDirection: 'row',
52
+ alignItems: 'center',
53
+ }}>
54
+ <OButton
55
+ imgLeftStyle={{ width: 18 }}
56
+ imgRightSrc={null}
57
+ style={{
58
+ borderWidth: 0,
59
+ width: 26,
60
+ height: 26,
61
+ backgroundColor: '#FFF',
62
+ borderColor: '#FFF',
63
+ shadowColor: '#FFF',
64
+ paddingLeft: 0,
65
+ paddingRight: 0,
66
+ }}
67
+ onClick={onClose}
68
+ icon={AntDesignIcon}
69
+ iconProps={{
70
+ name: 'arrowleft',
71
+ size: 26,
72
+ style: {
73
+ color: theme.colors.textNormal
74
+ }
75
+ }}
76
+ />
77
+ <OText color={theme.colors.textNormal} weight='bold' size={20} mLeft={10}>{t('PURCHASE_GIFT_CARD', 'Purchase gift card')}</OText>
78
+ </View>
46
79
  <OText color={theme.colors.textNormal} size={14}>{t('SELECT_ONE_OPTION', 'Select one option')}</OText>
47
80
  <ScrollView
48
81
  contentContainerStyle={{
@@ -3,9 +3,10 @@ import {
3
3
  useLanguage, useUtils, RedeemGiftCard as RedeemGiftCardController
4
4
  } from 'ordering-components/native'
5
5
  import { useForm, Controller } from 'react-hook-form'
6
- import { StyleSheet, View, Alert } from 'react-native';
6
+ import { StyleSheet, View, Alert, Platform } from 'react-native';
7
7
  import { useTheme } from 'styled-components/native';
8
8
  import { OText, OButton, OInput } from '../../shared';
9
+ import AntDesignIcon from 'react-native-vector-icons/AntDesign'
9
10
 
10
11
  import {
11
12
  Container,
@@ -93,7 +94,38 @@ const RedeemGiftCardUI = (props: any) => {
93
94
  <Container>
94
95
  {!redeemedGiftCard ? (
95
96
  <View>
96
- <OText color={theme.colors.textNormal} weight='bold' size={20} mBottom={40}>{t('REDEEM_GIFT_CARD', 'Redeem a gift card')}</OText>
97
+ <View style={{
98
+ marginBottom: 40,
99
+ marginTop: Platform.OS === 'ios' ? 30 : 50,
100
+ display: 'flex',
101
+ flexDirection: 'row',
102
+ alignItems: 'center',
103
+ }}>
104
+ <OButton
105
+ imgLeftStyle={{ width: 18 }}
106
+ imgRightSrc={null}
107
+ style={{
108
+ borderWidth: 0,
109
+ width: 26,
110
+ height: 26,
111
+ backgroundColor: '#FFF',
112
+ borderColor: '#FFF',
113
+ shadowColor: '#FFF',
114
+ paddingLeft: 0,
115
+ paddingRight: 0,
116
+ }}
117
+ onClick={onClose}
118
+ icon={AntDesignIcon}
119
+ iconProps={{
120
+ name: 'arrowleft',
121
+ size: 26,
122
+ style: {
123
+ color: theme.colors.textNormal
124
+ }
125
+ }}
126
+ />
127
+ <OText color={theme.colors.textNormal} weight='bold' size={20} mLeft={10}>{t('REDEEM_GIFT_CARD', 'Redeem a gift card')}</OText>
128
+ </View>
97
129
  <FormController>
98
130
  <OText color={theme.colors.textNormal} size={14} mBottom={10}>{t('GIFT_CARD_CODE', 'Gift card code')}</OText>
99
131
  <Controller
@@ -156,7 +188,38 @@ const RedeemGiftCardUI = (props: any) => {
156
188
  </View>
157
189
  ) : (
158
190
  <>
159
- <OText color={theme.colors.textNormal} weight='bold' size={20} mBottom={40}>{t('GIFT_CARD', 'Gift card')}</OText>
191
+ <View style={{
192
+ marginBottom: 40,
193
+ marginTop: Platform.OS === 'ios' ? 30 : 50,
194
+ display: 'flex',
195
+ flexDirection: 'row',
196
+ alignItems: 'center',
197
+ }}>
198
+ <OButton
199
+ imgLeftStyle={{ width: 18 }}
200
+ imgRightSrc={null}
201
+ style={{
202
+ borderWidth: 0,
203
+ width: 26,
204
+ height: 26,
205
+ backgroundColor: '#FFF',
206
+ borderColor: '#FFF',
207
+ shadowColor: '#FFF',
208
+ paddingLeft: 0,
209
+ paddingRight: 0,
210
+ }}
211
+ onClick={onClose}
212
+ icon={AntDesignIcon}
213
+ iconProps={{
214
+ name: 'arrowleft',
215
+ size: 26,
216
+ style: {
217
+ color: theme.colors.textNormal
218
+ }
219
+ }}
220
+ />
221
+ <OText color={theme.colors.textNormal} weight='bold' size={20} mLeft={10}>{t('GIFT_CARD', 'Gift card')}</OText>
222
+ </View>
160
223
  <View>
161
224
  <OText color={theme.colors.textNormal} size={14} mBottom={6}>{t('TYPE', 'Type')}: {redeemedGiftCard?.type}</OText>
162
225
  <OText color={theme.colors.textNormal} size={14} mBottom={6}>{t('AMOUNT', 'Amount')}: {parsePrice(redeemedGiftCard?.amount)}</OText>
@@ -92,7 +92,6 @@ const NavBar = (props: Props) => {
92
92
  <TitleWrapper style={{ ...{ paddingHorizontal: props.isVertical ? 0 : 10 }, ...props.titleWrapStyle }}>
93
93
  <OText
94
94
  size={20}
95
- lineHeight={36}
96
95
  weight={Platform.OS === 'ios' ? '600' : 'bold'}
97
96
  style={
98
97
  {
@@ -141,6 +141,7 @@ const WalletsUI = (props: any) => {
141
141
  showCall={false}
142
142
  paddingTop={10}
143
143
  btnStyle={{ paddingLeft: 0 }}
144
+ isVertical={!hideWalletsTheme}
144
145
  hideArrowLeft={!hideWalletsTheme}
145
146
  />
146
147
  {isChewLayout && !openHistory && (
@@ -1,7 +1,6 @@
1
1
  import styled from 'styled-components/native'
2
2
 
3
3
  export const Container = styled.View`
4
- padding-horizontal: 20px;
5
4
  padding-bottom: 20px;
6
5
  padding-top: ${(props: any) => props.pdng};
7
6
  `