ordering-ui-react-native 0.22.44 → 0.22.45

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 (26) hide show
  1. package/package.json +1 -1
  2. package/themes/original/src/components/AddressForm/index.tsx +5 -0
  3. package/themes/original/src/components/AddressList/index.tsx +10 -0
  4. package/themes/original/src/components/Favorite/index.tsx +5 -0
  5. package/themes/original/src/components/ForgotPasswordForm/index.tsx +5 -0
  6. package/themes/original/src/components/Help/index.tsx +7 -0
  7. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +5 -0
  8. package/themes/original/src/components/HelpGuide/index.tsx +5 -0
  9. package/themes/original/src/components/HelpOrder/index.tsx +5 -0
  10. package/themes/original/src/components/LoginForm/index.tsx +5 -0
  11. package/themes/original/src/components/MessageListing/index.tsx +6 -0
  12. package/themes/original/src/components/MomentOption/index.tsx +5 -0
  13. package/themes/original/src/components/MyOrders/index.tsx +5 -0
  14. package/themes/original/src/components/NavBar/index.tsx +2 -0
  15. package/themes/original/src/components/Notifications/index.tsx +5 -0
  16. package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -0
  17. package/themes/original/src/components/PreviousOrders/index.tsx +2 -0
  18. package/themes/original/src/components/Promotions/index.tsx +5 -0
  19. package/themes/original/src/components/ReviewDriver/index.tsx +5 -0
  20. package/themes/original/src/components/ReviewOrder/index.tsx +5 -0
  21. package/themes/original/src/components/ReviewProducts/index.tsx +5 -0
  22. package/themes/original/src/components/Sessions/index.tsx +5 -0
  23. package/themes/original/src/components/SignupForm/index.tsx +5 -0
  24. package/themes/original/src/components/UserProfileForm/index.tsx +5 -0
  25. package/themes/original/src/components/Wallets/index.tsx +5 -0
  26. package/themes/original/src/components/shared/OButton.tsx +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.22.44",
3
+ "version": "0.22.45",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -542,6 +542,11 @@ const AddressFormUI = (props: AddressFormParams) => {
542
542
  style={{ marginTop: Platform.OS === 'ios' ? 0 : 10 }}
543
543
  titleWrapStyle={{ paddingHorizontal: 0, width: '100%' }}
544
544
  titleStyle={{ marginRight: 0, marginLeft: 0, paddingRight: 5 }}
545
+ buttonProps={{
546
+ bgColor: theme.colors.white,
547
+ borderColor: theme.colors.white,
548
+ textStyle: { color: theme.colors.btnFont }
549
+ }}
545
550
  />
546
551
  </View>
547
552
  <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
@@ -152,6 +152,11 @@ const AddressListUI = (props: AddressListParams) => {
152
152
  showCall={false}
153
153
  paddingTop={10}
154
154
  btnStyle={{ paddingLeft: 0 }}
155
+ buttonProps={{
156
+ bgColor: theme.colors.white,
157
+ borderColor: theme.colors.white,
158
+ textStyle: { color: theme.colors.btnFont }
159
+ }}
155
160
  />
156
161
  )}
157
162
  {
@@ -173,6 +178,11 @@ const AddressListUI = (props: AddressListParams) => {
173
178
  style={{ marginTop: 0 }}
174
179
  titleWrapStyle={{ paddingHorizontal: 0 }}
175
180
  titleStyle={{ marginLeft: 0, marginRight: 0 }}
181
+ buttonProps={{
182
+ bgColor: theme.colors.white,
183
+ borderColor: theme.colors.white,
184
+ textStyle: { color: theme.colors.btnFont }
185
+ }}
176
186
  />
177
187
  )}
178
188
  {addressList.loading && addressList?.addresses?.length === 0 && (
@@ -44,6 +44,11 @@ export const Favorite = (props: any) => {
44
44
  paddingTop={Platform.OS === 'ios' ? 20 : 10}
45
45
  style={{ paddingVertical: 0 }}
46
46
  btnStyle={{ paddingLeft: 0 }}
47
+ buttonProps={{
48
+ bgColor: theme.colors.white,
49
+ borderColor: theme.colors.white,
50
+ textStyle: { color: theme.colors.btnFont }
51
+ }}
47
52
  />
48
53
  <TabContainer>
49
54
  {tabList.map((menu, i) => (
@@ -125,6 +125,11 @@ const ForgotPasswordUI = (props: any) => {
125
125
  style={{ flexDirection: 'column', alignItems: 'flex-start' }}
126
126
  titleStyle={{ width: '100%', marginLeft: 0, paddingLeft: 0 }}
127
127
  titleWrapStyle={{ paddingHorizontal: 0, paddingStart: 0, flex: 1 }}
128
+ buttonProps={{
129
+ bgColor: theme.colors.white,
130
+ borderColor: theme.colors.white,
131
+ textStyle: { color: theme.colors.btnFont }
132
+ }}
128
133
  />
129
134
  <FormSide>
130
135
  <OText
@@ -1,4 +1,5 @@
1
1
  import React, { useState } from 'react'
2
+ import { useTheme } from 'styled-components/native';
2
3
  import { Platform, RefreshControl } from 'react-native'
3
4
  import { HelpParams } from '../../types'
4
5
  import { useLanguage } from 'ordering-components/native'
@@ -17,6 +18,7 @@ export const Help = (props: HelpParams) => {
17
18
  navigation
18
19
  } = props
19
20
  const [, t] = useLanguage()
21
+ const theme = useTheme()
20
22
  const [refreshing] = useState(false);
21
23
  const [refresh, setRefresh] = useState(false)
22
24
 
@@ -46,6 +48,11 @@ export const Help = (props: HelpParams) => {
46
48
  onActionLeft={goToBack}
47
49
  showCall={false}
48
50
  btnStyle={{ paddingLeft: 0 }}
51
+ buttonProps={{
52
+ bgColor: theme.colors.white,
53
+ borderColor: theme.colors.white,
54
+ textStyle: { color: theme.colors.btnFont }
55
+ }}
49
56
  />
50
57
  <HelpSubItem
51
58
  onPress={() => onRedirect('HelpOrder')}
@@ -37,6 +37,11 @@ export const HelpAccountAndPayment = (props: HelpAccountAndPaymentParams) => {
37
37
  onActionLeft={goToBack}
38
38
  btnStyle={{ paddingLeft: 0 }}
39
39
  showCall={false}
40
+ buttonProps={{
41
+ bgColor: theme.colors.white,
42
+ borderColor: theme.colors.white,
43
+ textStyle: { color: theme.colors.btnFont }
44
+ }}
40
45
  />
41
46
  <Content>
42
47
  <OText mBottom={20}>
@@ -43,6 +43,11 @@ export const HelpGuide = (props: HelpGuideParams) => {
43
43
  onActionLeft={goToBack}
44
44
  btnStyle={{ paddingLeft: 0 }}
45
45
  showCall={false}
46
+ buttonProps={{
47
+ bgColor: theme.colors.white,
48
+ borderColor: theme.colors.white,
49
+ textStyle: { color: theme.colors.btnFont }
50
+ }}
46
51
  />
47
52
  <Content>
48
53
  <OText mBottom={15}>
@@ -39,6 +39,11 @@ export const HelpOrder = (props: HelpOrderParams) => {
39
39
  onActionLeft={goToBack}
40
40
  btnStyle={{ paddingLeft: 0 }}
41
41
  showCall={false}
42
+ buttonProps={{
43
+ bgColor: theme.colors.white,
44
+ borderColor: theme.colors.white,
45
+ textStyle: { color: theme.colors.btnFont }
46
+ }}
42
47
  />
43
48
  <Content>
44
49
  <OText mBottom={20}>
@@ -412,6 +412,11 @@ const LoginFormUI = (props: LoginParams) => {
412
412
  btnStyle={{ paddingLeft: 0 }}
413
413
  titleWrapStyle={{ paddingHorizontal: 0 }}
414
414
  titleStyle={{ marginRight: 0, marginLeft: 0 }}
415
+ buttonProps={{
416
+ bgColor: theme.colors.white,
417
+ borderColor: theme.colors.white,
418
+ textStyle: { color: theme.colors.btnFont }
419
+ }}
415
420
  />
416
421
  )}
417
422
  <FormSide>
@@ -237,6 +237,7 @@ export const MessageListing = (props: MessageListingParams) => {
237
237
  const [seletedOrder, setSeletedOrder] = useState<any>()
238
238
  const [openMessages, setOpenMessges] = useState(false)
239
239
  const [, t] = useLanguage()
240
+ const theme = useTheme()
240
241
 
241
242
  const goToBack = () => {
242
243
  navigation?.canGoBack() && navigation.goBack()
@@ -265,6 +266,11 @@ export const MessageListing = (props: MessageListingParams) => {
265
266
  showCall={false}
266
267
  paddingTop={Platform.OS === 'ios' ? 20 : 10}
267
268
  btnStyle={{ paddingLeft: 0 }}
269
+ buttonProps={{
270
+ bgColor: theme.colors.white,
271
+ borderColor: theme.colors.white,
272
+ textStyle: { color: theme.colors.btnFont }
273
+ }}
268
274
  />
269
275
  <OrderListing
270
276
  ordersLength={{ activeOrdersLength: 0, previousOrdersLength: 0 }}
@@ -343,6 +343,11 @@ const MomentOptionUI = (props: MomentOptionParams) => {
343
343
  titleAlign={'center'}
344
344
  titleStyle={{ fontSize: 20, marginRight: 0, marginLeft: 0 }}
345
345
  titleWrapStyle={{ paddingHorizontal: 0 }}
346
+ buttonProps={{
347
+ bgColor: theme.colors.white,
348
+ borderColor: theme.colors.white,
349
+ textStyle: { color: theme.colors.btnFont }
350
+ }}
346
351
  />
347
352
  )}
348
353
  {(preorderMinimumDays === 0 && preorderLeadTime === 0) || !cateringPreorder && (
@@ -101,6 +101,11 @@ export const MyOrders = (props: any) => {
101
101
  showCall={false}
102
102
  paddingTop={30}
103
103
  btnStyle={{ paddingLeft: 0 }}
104
+ buttonProps={{
105
+ bgColor: theme.colors.white,
106
+ borderColor: theme.colors.white,
107
+ textStyle: { color: theme.colors.btnFont }
108
+ }}
104
109
  />
105
110
  )}
106
111
  </View>
@@ -44,6 +44,7 @@ interface Props {
44
44
  isVertical?: boolean,
45
45
  noMargin?: any
46
46
  hideArrowLeft?: boolean
47
+ buttonProps?: any
47
48
  }
48
49
 
49
50
  const NavBar = (props: Props) => {
@@ -64,6 +65,7 @@ const NavBar = (props: Props) => {
64
65
  <Wrapper style={{ paddingTop: props.paddingTop, ...{ flexDirection: props.isVertical ? 'column' : 'row', alignItems: props.isVertical ? 'flex-start' : 'center' }, ...props.style }}>
65
66
  {!props.hideArrowLeft && (
66
67
  <OButton
68
+ {...props.buttonProps}
67
69
  iconProps={{
68
70
  name: 'arrowleft',
69
71
  size: 26
@@ -75,6 +75,11 @@ const NotificationsUI = (props: any) => {
75
75
  showCall={false}
76
76
  style={{ paddingVertical: 0 }}
77
77
  btnStyle={{ paddingLeft: 0 }}
78
+ buttonProps={{
79
+ bgColor: theme.colors.white,
80
+ borderColor: theme.colors.white,
81
+ textStyle: { color: theme.colors.btnFont }
82
+ }}
78
83
  />
79
84
  {showCustomerPromotions && showNotifications && (
80
85
  <>
@@ -103,6 +103,11 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
103
103
  title={t('HOW_WILL_YOU_DELIVERY_TYPE', 'How will your order type?')}
104
104
  titleAlign={'center'}
105
105
  noMargin
106
+ buttonProps={{
107
+ bgColor: theme.colors.white,
108
+ borderColor: theme.colors.white,
109
+ textStyle: { color: theme.colors.btnFont }
110
+ }}
106
111
  />
107
112
  {
108
113
  items.length > 0 && (
@@ -49,6 +49,8 @@ export const PreviousOrders = (props: PreviousOrdersParams) => {
49
49
  onClick={loadMoreOrders}
50
50
  text={t('LOAD_MORE_ORDERS', 'Load more orders')}
51
51
  imgRightSrc={null}
52
+ bgColor={theme.colors.primary}
53
+ borderColor={theme.colors.primary}
52
54
  textStyle={{ color: theme.colors.white }}
53
55
  style={{ borderRadius: 7.6, shadowOpacity: 0, marginTop: 20 }}
54
56
  />
@@ -113,6 +113,11 @@ const PromotionsUI = (props: PromotionParams) => {
113
113
  paddingTop={Platform.OS === 'ios' ? 20 : 10}
114
114
  style={{ paddingVertical: 0 }}
115
115
  btnStyle={{ paddingLeft: 0 }}
116
+ buttonProps={{
117
+ bgColor: theme.colors.white,
118
+ borderColor: theme.colors.white,
119
+ textStyle: { color: theme.colors.btnFont }
120
+ }}
116
121
  />
117
122
  <PromotionsContainer>
118
123
  <SearchBarContainer>
@@ -192,6 +192,11 @@ const ReviewDriverUI = (props: ReviewDriverParams) => {
192
192
  style={{ flexDirection: 'column', alignItems: 'flex-start' }}
193
193
  titleWrapStyle={{ paddingHorizontal: 0 }}
194
194
  titleStyle={{ marginRight: 0, marginLeft: 0 }}
195
+ buttonProps={{
196
+ bgColor: theme.colors.white,
197
+ borderColor: theme.colors.white,
198
+ textStyle: { color: theme.colors.btnFont }
199
+ }}
195
200
  />
196
201
  <DriverPhotoContainer>
197
202
  <View
@@ -215,6 +215,11 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
215
215
  style={{ flexDirection: 'column', alignItems: 'flex-start' }}
216
216
  titleWrapStyle={{ paddingHorizontal: 0 }}
217
217
  titleStyle={{ marginRight: 0, marginLeft: 0 }}
218
+ buttonProps={{
219
+ bgColor: theme.colors.white,
220
+ borderColor: theme.colors.white,
221
+ textStyle: { color: theme.colors.btnFont }
222
+ }}
218
223
  />
219
224
  <BusinessLogo isMulti={order?.business?.length > 1}>
220
225
  {typeof order?.logo === 'string' || !order?.logo ? (
@@ -73,6 +73,11 @@ const ReviewProductsUI = (props: ReviewProductParams) => {
73
73
  style={{ flexDirection: 'column', alignItems: 'flex-start' }}
74
74
  titleWrapStyle={{ paddingHorizontal: 0 }}
75
75
  titleStyle={{ marginRight: 0, marginLeft: 0 }}
76
+ buttonProps={{
77
+ bgColor: theme.colors.white,
78
+ borderColor: theme.colors.white,
79
+ textStyle: { color: theme.colors.btnFont }
80
+ }}
76
81
  />
77
82
  {order?.products && order.products.length > 0 && order?.products.map(productsOrder => (
78
83
  productsOrder?.length ? productsOrder?.map((product: any, i: any) => !product?.deleted ?
@@ -72,6 +72,11 @@ export const SessionsUI = (props: SessionsParams) => {
72
72
  showCall={false}
73
73
  paddingTop={10}
74
74
  btnStyle={{ paddingLeft: 0 }}
75
+ buttonProps={{
76
+ bgColor: theme.colors.white,
77
+ borderColor: theme.colors.white,
78
+ textStyle: { color: theme.colors.btnFont }
79
+ }}
75
80
  />
76
81
  {user?.session_strategy === 'jwt_session' ? (
77
82
  <>
@@ -488,6 +488,11 @@ const SignupFormUI = (props: SignupParams) => {
488
488
  btnStyle={{ paddingLeft: 0 }}
489
489
  titleWrapStyle={{ paddingHorizontal: 0 }}
490
490
  titleStyle={{ marginLeft: 0, marginRight: 0 }}
491
+ buttonProps={{
492
+ bgColor: theme.colors.white,
493
+ borderColor: theme.colors.white,
494
+ textStyle: { color: theme.colors.btnFont }
495
+ }}
491
496
  />
492
497
  )}
493
498
  <FormSide>
@@ -287,6 +287,11 @@ const ProfileUI = (props: ProfileParams) => {
287
287
  onActionLeft={() => navigation.goBack()}
288
288
  showCall={false}
289
289
  btnStyle={{ paddingLeft: 0 }}
290
+ buttonProps={{
291
+ bgColor: theme.colors.white,
292
+ borderColor: theme.colors.white,
293
+ textStyle: { color: theme.colors.btnFont }
294
+ }}
290
295
  />
291
296
  <CenterView>
292
297
  <View style={styles.photo}>
@@ -141,6 +141,11 @@ const WalletsUI = (props: any) => {
141
141
  btnStyle={{ paddingLeft: 0 }}
142
142
  isVertical={!hideWalletsTheme}
143
143
  hideArrowLeft={!hideWalletsTheme}
144
+ buttonProps={{
145
+ bgColor: theme.colors.white,
146
+ borderColor: theme.colors.white,
147
+ textStyle: { color: theme.colors.btnFont }
148
+ }}
144
149
  />
145
150
  {isChewLayout && !openHistory && (
146
151
  <OButton
@@ -119,7 +119,7 @@ const OButton = (props: Props): React.ReactElement => {
119
119
  style={{ width: props.isCircle ? 52 : props.style?.width, ...props.parentStyle }}
120
120
  disabled={props.isDisabledWithSameStyles}
121
121
  >
122
- <StyledButton style={{ ...props.style, backgroundColor: props.bgColor ?? theme?.general?.components?.buttons?.color, borderColor: props.borderColor ?? theme?.general?.components?.buttons?.color, borderRadius: parseInt(theme?.general?.components?.buttons?.borderRadius) || props.style?.borderRadius }}>
122
+ <StyledButton style={{ ...props.style, backgroundColor: props.bgColor, borderColor: props.borderColor, borderRadius: props.style?.borderRadius }}>
123
123
  {props.icon ? (
124
124
  <props.icon {...props.iconProps} />
125
125
  ) : null}
@@ -127,7 +127,7 @@ const OButton = (props: Props): React.ReactElement => {
127
127
  <OIcon style={props.imgLeftStyle} src={props.imgLeftSrc} color={theme.colors.textNormal} />
128
128
  ) : null}
129
129
  {props.text ? (
130
- <StyledText style={{ ...props.textStyle, color: props?.textStyle?.color ?? theme?.general?.components?.buttons?.buttonTextColor }}>{props.text}</StyledText>
130
+ <StyledText style={{ ...props.textStyle, color: props?.textStyle?.color }}>{props.text}</StyledText>
131
131
  ) : null}
132
132
  {props.imgRightSrc ? (
133
133
  <EndImage style={props.imgRightStyle} source={props.imgRightSrc} />