ordering-ui-react-native 0.22.21 → 0.22.22-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 +6 -7
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +40 -39
- package/src/components/StripeMethodForm/index.tsx +4 -2
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/context/OfflineActions/index.tsx +236 -0
- package/src/types/index.tsx +2 -1
- package/themes/business/index.tsx +2 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +9 -6
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +1 -0
- package/themes/business/src/components/BusinessController/index.tsx +8 -3
- package/themes/business/src/components/BusinessProductList/index.tsx +3 -2
- package/themes/business/src/components/Chat/index.tsx +15 -3
- package/themes/business/src/components/DriverMap/index.tsx +49 -26
- package/themes/business/src/components/FloatingButton/index.tsx +3 -2
- package/themes/business/src/components/GoogleMap/index.tsx +15 -8
- package/themes/business/src/components/LanguageSelector/index.tsx +2 -3
- package/themes/business/src/components/LanguageSelector/lang_country.json +515 -70
- package/themes/business/src/components/LogoutButton/index.tsx +1 -1
- package/themes/business/src/components/MapView/index.tsx +36 -17
- package/themes/business/src/components/NewOrderNotification/index.tsx +38 -19
- package/themes/business/src/components/OrderDetails/Business.tsx +47 -27
- package/themes/business/src/components/OrderDetails/Delivery.tsx +134 -53
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +128 -41
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +45 -18
- package/themes/business/src/components/OrderDetails/styles.tsx +39 -3
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +17 -16
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +3 -2
- package/themes/business/src/components/OrderSummary/index.tsx +6 -4
- package/themes/business/src/components/OrdersListManager/index.tsx +13 -1
- package/themes/business/src/components/OrdersOption/index.tsx +217 -156
- package/themes/business/src/components/PhoneInputNumber/index.tsx +8 -5
- package/themes/business/src/components/PreviousMessages/index.tsx +26 -3
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +39 -16
- package/themes/business/src/components/PreviousOrders/index.tsx +74 -66
- package/themes/business/src/components/PrinterEdition/MessageAlert.tsx +33 -0
- package/themes/business/src/components/PrinterEdition/index.tsx +431 -0
- package/themes/business/src/components/PrinterEdition/printerList.tsx +23 -0
- package/themes/business/src/components/PrinterEdition/styles.tsx +61 -0
- package/themes/business/src/components/PrinterSettings/index.tsx +162 -174
- package/themes/business/src/components/PrinterSettings/styles.tsx +14 -1
- package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
- package/themes/business/src/components/StoresList/index.tsx +2 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +55 -22
- package/themes/business/src/components/UserProfileForm/styles.tsx +7 -0
- package/themes/business/src/components/WebsocketStatus/index.tsx +2 -2
- package/themes/business/src/components/shared/OTextarea.tsx +8 -9
- package/themes/business/src/config/currency.tsx +1010 -0
- package/themes/business/src/hooks/useLocation.tsx +16 -12
- package/themes/business/src/layouts/SafeAreaContainer.tsx +35 -19
- package/themes/business/src/types/index.tsx +16 -4
- package/themes/business/src/utils/index.tsx +33 -3
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +11 -0
- package/themes/original/src/components/AddressForm/index.tsx +32 -17
- package/themes/original/src/components/AddressList/index.tsx +8 -7
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +5 -8
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +13 -5
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +103 -92
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +8 -6
- package/themes/original/src/components/BusinessListingSearch/index.tsx +1 -2
- package/themes/original/src/components/BusinessPreorder/index.tsx +46 -28
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +73 -70
- package/themes/original/src/components/BusinessProductsList/index.tsx +6 -7
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +10 -6
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +9 -8
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +2 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
- package/themes/original/src/components/Cart/index.tsx +46 -14
- package/themes/original/src/components/CartContent/index.tsx +2 -4
- package/themes/original/src/components/Checkout/index.tsx +127 -77
- package/themes/original/src/components/CitiesControl/index.tsx +0 -3
- package/themes/original/src/components/CouponControl/index.tsx +1 -3
- package/themes/original/src/components/DriverTips/index.tsx +1 -3
- package/themes/original/src/components/Favorite/index.tsx +1 -5
- package/themes/original/src/components/FavoriteList/index.tsx +0 -1
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +5 -7
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +15 -17
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +3 -7
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +24 -32
- package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +7 -9
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +11 -12
- package/themes/original/src/components/GoogleMap/index.tsx +39 -18
- package/themes/original/src/components/Help/index.tsx +2 -0
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +3 -11
- package/themes/original/src/components/LoginForm/Otp/index.tsx +0 -3
- package/themes/original/src/components/LoginForm/index.tsx +12 -9
- package/themes/original/src/components/MessageListing/index.tsx +2 -1
- package/themes/original/src/components/Messages/index.tsx +27 -19
- package/themes/original/src/components/MomentOption/TimeListItem.tsx +56 -0
- package/themes/original/src/components/MomentOption/index.tsx +80 -51
- package/themes/original/src/components/MomentSelector/index.tsx +5 -2
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +7 -3
- package/themes/original/src/components/MultiCheckout/index.tsx +55 -27
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +1 -0
- package/themes/original/src/components/MyOrders/index.tsx +2 -2
- package/themes/original/src/components/NavBar/index.tsx +7 -4
- package/themes/original/src/components/NetworkError/index.tsx +0 -5
- package/themes/original/src/components/NotFoundSource/index.tsx +0 -3
- package/themes/original/src/components/OrderDetails/OrderEta.tsx +4 -3
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +16 -11
- package/themes/original/src/components/OrderDetails/index.tsx +44 -21
- package/themes/original/src/components/OrderDetails/styles.tsx +0 -1
- package/themes/original/src/components/OrderProgress/index.tsx +4 -3
- package/themes/original/src/components/OrderSummary/index.tsx +29 -10
- package/themes/original/src/components/OrderTypeSelector/index.tsx +7 -6
- package/themes/original/src/components/OrdersOption/index.tsx +3 -6
- package/themes/original/src/components/PaymentOptionStripe/index.tsx +0 -5
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +4 -3
- package/themes/original/src/components/PhoneInputNumber/index.tsx +92 -7
- package/themes/original/src/components/PlaceSpot/index.tsx +1 -3
- package/themes/original/src/components/PreviousOrders/index.tsx +1 -2
- package/themes/original/src/components/ProductForm/ActionButton.tsx +17 -20
- package/themes/original/src/components/ProductForm/index.tsx +107 -102
- package/themes/original/src/components/ProductItemAccordion/index.tsx +50 -43
- package/themes/original/src/components/ProductItemAccordion/styles.tsx +0 -3
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
- package/themes/original/src/components/ProfessionalProfile/index.tsx +4 -5
- package/themes/original/src/components/Promotions/index.tsx +6 -9
- package/themes/original/src/components/ReviewDriver/index.tsx +1 -1
- package/themes/original/src/components/ReviewOrder/index.tsx +2 -2
- package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
- package/themes/original/src/components/ReviewTrigger/index.tsx +2 -2
- package/themes/original/src/components/ServiceForm/index.tsx +52 -54
- package/themes/original/src/components/Sessions/index.tsx +3 -3
- package/themes/original/src/components/SignupForm/index.tsx +102 -88
- package/themes/original/src/components/SingleOrderCard/index.tsx +6 -4
- package/themes/original/src/components/SingleProductCard/index.tsx +5 -5
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
- package/themes/original/src/components/StripeCardForm/index.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +16 -3
- package/themes/original/src/components/StripeElementsForm/index.tsx +76 -62
- package/themes/original/src/components/StripeElementsForm/naked.tsx +48 -1
- package/themes/original/src/components/StripeRedirectForm/index.tsx +0 -3
- package/themes/original/src/components/TaxInformation/index.tsx +3 -2
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +10 -7
- package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +8 -3
- package/themes/original/src/components/UserDetails/index.tsx +17 -16
- package/themes/original/src/components/UserFormDetails/index.tsx +164 -135
- package/themes/original/src/components/UserProfile/index.tsx +9 -1
- package/themes/original/src/components/UserVerification/index.tsx +15 -4
- package/themes/original/src/components/Wallets/index.tsx +6 -3
- package/themes/original/src/components/WebsocketStatus/index.tsx +1 -4
- package/themes/original/src/components/shared/OAlert.tsx +2 -1
- package/themes/original/src/components/shared/OButton.tsx +5 -4
- package/themes/original/src/components/shared/OInput.tsx +4 -8
- package/themes/original/src/components/shared/OModal.tsx +7 -2
- package/themes/original/src/types/index.tsx +10 -3
- package/themes/original/src/utils/index.tsx +30 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { View, StyleSheet, ScrollView, ActivityIndicator, Pressable } from 'react-native';
|
|
3
|
+
import { _retrieveStoreData, _clearStoreData } from '../../providers/StoreUtil';
|
|
3
4
|
import { useForm } from 'react-hook-form';
|
|
4
5
|
import { launchImageLibrary } from 'react-native-image-picker';
|
|
5
6
|
import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder';
|
|
@@ -11,7 +12,8 @@ import {
|
|
|
11
12
|
useToast,
|
|
12
13
|
useLanguage,
|
|
13
14
|
useUtils,
|
|
14
|
-
useConfig
|
|
15
|
+
useConfig,
|
|
16
|
+
useValidationFields
|
|
15
17
|
} from 'ordering-components/native';
|
|
16
18
|
import {
|
|
17
19
|
CenterView,
|
|
@@ -19,6 +21,7 @@ import {
|
|
|
19
21
|
UserData,
|
|
20
22
|
EditButton,
|
|
21
23
|
EnabledStatusDriver,
|
|
24
|
+
RemoveAccount
|
|
22
25
|
} from './styles';
|
|
23
26
|
import { LogoutButton } from '../LogoutButton';
|
|
24
27
|
import { LanguageSelector } from '../LanguageSelector';
|
|
@@ -35,6 +38,8 @@ import {
|
|
|
35
38
|
OInput,
|
|
36
39
|
OModal,
|
|
37
40
|
} from '../../components/shared';
|
|
41
|
+
import { OAlert } from '../../../../../src/components/shared'
|
|
42
|
+
|
|
38
43
|
import { sortInputFields, getTraduction } from '../../utils';
|
|
39
44
|
import { ProfileParams } from '../../types';
|
|
40
45
|
import { NotFoundSource } from '../NotFoundSource';
|
|
@@ -48,6 +53,7 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
48
53
|
toggleIsEdit,
|
|
49
54
|
cleanFormState,
|
|
50
55
|
handleToggleAvalaibleStatusDriver,
|
|
56
|
+
handleRemoveAccount,
|
|
51
57
|
isAlsea,
|
|
52
58
|
isShowDriverStatus,
|
|
53
59
|
navigation
|
|
@@ -57,11 +63,13 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
57
63
|
const [, t] = useLanguage();
|
|
58
64
|
const [, { showToast }] = useToast();
|
|
59
65
|
const [{ optimizeImage }] = useUtils();
|
|
60
|
-
const [{ configs }] = useConfig()
|
|
66
|
+
const [{ configs }] = useConfig();
|
|
67
|
+
const [{ loading }, { loadOriginalValidationFields }] = useValidationFields()
|
|
61
68
|
const { errors } = useForm();
|
|
62
69
|
const theme = useTheme();
|
|
70
|
+
const [confirm, setConfirm] = useState<any>({ open: false, content: null, handleOnAccept: null, id: null, title: null })
|
|
63
71
|
|
|
64
|
-
const [phoneInputData, setPhoneInputData] = useState({
|
|
72
|
+
const [phoneInputData, setPhoneInputData] = useState<any>({
|
|
65
73
|
error: '',
|
|
66
74
|
phone: {
|
|
67
75
|
country_phone_code: null,
|
|
@@ -74,16 +82,7 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
74
82
|
const [phoneToShow, setPhoneToShow] = useState('');
|
|
75
83
|
const [openModal, setOpenModal] = useState(false)
|
|
76
84
|
const allowDriverUpdateData = user?.level !== 4 || configs?.allow_driver_update_data?.value === "1"
|
|
77
|
-
|
|
78
|
-
if (phoneInputData.phone.cellphone) {
|
|
79
|
-
const codeNumberPhone = phoneInputData.phone.cellphone.slice(0, 3);
|
|
80
|
-
const numberPhone = phoneInputData.phone.cellphone.slice(
|
|
81
|
-
3,
|
|
82
|
-
phoneInputData.phone.cellphone?.length,
|
|
83
|
-
);
|
|
84
|
-
setPhoneToShow(`(${codeNumberPhone}) ${numberPhone}`);
|
|
85
|
-
}
|
|
86
|
-
}, [phoneInputData.phone.cellphone]);
|
|
85
|
+
const isAdmin = user?.level === 0
|
|
87
86
|
|
|
88
87
|
const setUserCellPhone = (isEdit = false) => {
|
|
89
88
|
if (userPhoneNumber && !userPhoneNumber.includes('null') && !isEdit) {
|
|
@@ -149,6 +148,28 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
149
148
|
});
|
|
150
149
|
};
|
|
151
150
|
|
|
151
|
+
const onRemoveAccount = async () => {
|
|
152
|
+
setConfirm({
|
|
153
|
+
open: true,
|
|
154
|
+
content: [t('QUESTION_REMOVE_ACCOUNT', 'Are you sure that you want to remove your account?')],
|
|
155
|
+
title: t('ACCOUNT_ALERT', 'Account alert'),
|
|
156
|
+
handleOnAccept: () => {
|
|
157
|
+
setConfirm({ ...confirm, open: false })
|
|
158
|
+
handleRemoveAccount && handleRemoveAccount(user?.id)
|
|
159
|
+
_clearStoreData({ excludedKeys: ['isTutorial', 'language'] });
|
|
160
|
+
props?.setRootState && props?.setRootState({ isAuth: false, token: null })
|
|
161
|
+
}
|
|
162
|
+
})
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
useEffect(() => {
|
|
166
|
+
if (phoneInputData.phone.cellphone) {
|
|
167
|
+
const codeNumberPhone = phoneInputData.phone.country_phone_code
|
|
168
|
+
const numberPhone = phoneInputData.phone.cellphone
|
|
169
|
+
setPhoneToShow(`(${codeNumberPhone}) ${numberPhone}`);
|
|
170
|
+
}
|
|
171
|
+
}, [phoneInputData.phone.cellphone]);
|
|
172
|
+
|
|
152
173
|
useEffect(() => {
|
|
153
174
|
const isLoadingDriver = userState?.loadingDriver ?? true;
|
|
154
175
|
|
|
@@ -262,15 +283,17 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
262
283
|
|
|
263
284
|
return (
|
|
264
285
|
<>
|
|
265
|
-
{validationFields?.error && (
|
|
286
|
+
{validationFields?.error && !loading && (
|
|
266
287
|
<NotFoundSource
|
|
267
288
|
content={
|
|
268
|
-
validationFields?.error[0] ||
|
|
269
|
-
validationFields?.error[0]?.message ||
|
|
289
|
+
validationFields?.error?.[0] ||
|
|
290
|
+
validationFields?.error?.[0]?.message ||
|
|
270
291
|
t('NETWORK_ERROR', 'Network Error')
|
|
271
292
|
}
|
|
272
293
|
image={theme.images.general.notFound}
|
|
273
294
|
conditioned={false}
|
|
295
|
+
onClickButton={() => loadOriginalValidationFields({ forceLoading: true })}
|
|
296
|
+
btnTitle={t('REFRESH_PROFILE', 'Refresh profile')}
|
|
274
297
|
/>
|
|
275
298
|
)}
|
|
276
299
|
|
|
@@ -463,7 +486,6 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
463
486
|
/>
|
|
464
487
|
|
|
465
488
|
<OText style={styles.label}>{t('PHONE', 'Phone')}</OText>
|
|
466
|
-
|
|
467
489
|
<OInput
|
|
468
490
|
isSecured={true}
|
|
469
491
|
placeholder={
|
|
@@ -486,10 +508,11 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
486
508
|
handleCancelEdit={handleCancelEdit}
|
|
487
509
|
toggleIsEdit={toggleIsEdit}
|
|
488
510
|
isAlsea={isAlsea}
|
|
511
|
+
allowDriverUpdateData={allowDriverUpdateData}
|
|
489
512
|
/>
|
|
490
513
|
</View>
|
|
491
514
|
)}
|
|
492
|
-
{!validationFields.loading && !isEdit &&
|
|
515
|
+
{!validationFields.loading && !isEdit && (
|
|
493
516
|
<EditButton>
|
|
494
517
|
<OButton
|
|
495
518
|
text={t('EDIT', 'Edit')}
|
|
@@ -516,7 +539,7 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
516
539
|
}} />
|
|
517
540
|
</Pressable>
|
|
518
541
|
) : (
|
|
519
|
-
<Pressable style={{ marginBottom: 10 }} onPress={() =>
|
|
542
|
+
<Pressable style={{ marginBottom: 10 }} onPress={() => navigation.navigate('PrinterSetup')}>
|
|
520
543
|
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
521
544
|
<OText size={16}>{t('PRINTER_SETTINGS', 'Printer Settings')}</OText>
|
|
522
545
|
<AntDesignIcon size={18} name='right' />
|
|
@@ -544,18 +567,28 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
544
567
|
|
|
545
568
|
<LogoutButton />
|
|
546
569
|
</Actions>
|
|
570
|
+
<RemoveAccount disabled={isAdmin} onPress={() => onRemoveAccount()} activeOpacity={0.7}>
|
|
571
|
+
<AntDesignIcon size={16} name='close' color={theme.colors.textNormal} style={{ marginEnd: 14 }} />
|
|
572
|
+
<OText size={14} lineHeight={24} weight={'400'} style={{ opacity: isAdmin ? 0.5 : 1 }} color={theme.colors.danger500}>{t('REMOVE_ACCOUNT', 'Remove account')}</OText>
|
|
573
|
+
</RemoveAccount>
|
|
547
574
|
<OModal
|
|
548
575
|
open={openModal}
|
|
549
576
|
onClose={() => setOpenModal(false)}
|
|
550
577
|
entireModal
|
|
551
578
|
hideIcons
|
|
552
579
|
>
|
|
553
|
-
{props.isBusinessApp
|
|
554
|
-
<PrinterSettings onClose={() => setOpenModal(false)} />
|
|
555
|
-
) : (
|
|
580
|
+
{!props.isBusinessApp && (
|
|
556
581
|
<DriverSchedule schedule={user?.schedule} />
|
|
557
582
|
)}
|
|
558
583
|
</OModal>
|
|
584
|
+
<OAlert
|
|
585
|
+
open={confirm.open}
|
|
586
|
+
title={confirm.title}
|
|
587
|
+
content={confirm.content}
|
|
588
|
+
onAccept={confirm.handleOnAccept}
|
|
589
|
+
onCancel={() => setConfirm({ ...confirm, open: false, title: null })}
|
|
590
|
+
onClose={() => setConfirm({ ...confirm, open: false, title: null })}
|
|
591
|
+
/>
|
|
559
592
|
</ScrollView>
|
|
560
593
|
)}
|
|
561
594
|
</>
|
|
@@ -34,3 +34,10 @@ export const Actions = styled.View`
|
|
|
34
34
|
justify-content: space-between;
|
|
35
35
|
align-items: flex-start;
|
|
36
36
|
`;
|
|
37
|
+
|
|
38
|
+
export const RemoveAccount = styled.TouchableOpacity`
|
|
39
|
+
flex-direction: row;
|
|
40
|
+
justify-content: flex-start;
|
|
41
|
+
align-items: center;
|
|
42
|
+
margin-bottom: 24px;
|
|
43
|
+
`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import { useLanguage, useUtils, WebsocketStatus as WebsocketStatusController } from 'ordering-components/native'
|
|
3
|
-
import { TouchableOpacity, View, StyleSheet } from 'react-native'
|
|
3
|
+
import { TouchableOpacity, View, StyleSheet, Platform } from 'react-native'
|
|
4
4
|
import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
5
5
|
import { useTheme } from 'styled-components/native'
|
|
6
6
|
import RNRestart from 'react-native-restart'
|
|
@@ -37,7 +37,7 @@ const SocketStatusUI = (props: any) => {
|
|
|
37
37
|
paddingLeft: 0,
|
|
38
38
|
paddingRight: 0,
|
|
39
39
|
marginBottom: 30,
|
|
40
|
-
marginTop: 30
|
|
40
|
+
marginTop: Platform.OS === 'ios' ? 60 : 30
|
|
41
41
|
},
|
|
42
42
|
})
|
|
43
43
|
|
|
@@ -4,8 +4,10 @@ import { useTheme } from 'styled-components/native';
|
|
|
4
4
|
|
|
5
5
|
const Wrapper = styled.View`
|
|
6
6
|
border-radius: 10px;
|
|
7
|
-
border: 1px
|
|
7
|
+
border-width: 1px;
|
|
8
|
+
border-color: ${(props: any) => props.theme.colors.lightGray};
|
|
8
9
|
`;
|
|
10
|
+
|
|
9
11
|
const Inner = styled.TextInput`
|
|
10
12
|
height: 100px;
|
|
11
13
|
padding: 5px 10px 5px 10px;
|
|
@@ -29,16 +31,13 @@ const OTextarea = (props: Props) => {
|
|
|
29
31
|
ref={props.textTareaRef}
|
|
30
32
|
onFocus={() => props.onFocus()}
|
|
31
33
|
onChangeText={(txt: any) => props.onChange(txt)}
|
|
32
|
-
textAlignVertical={'top'}
|
|
33
34
|
placeholder={props.placeholder}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
placeholderTextColor={theme.colors.lightGray}
|
|
36
|
+
numberOfLines={props.lines}
|
|
37
|
+
underlineColorAndroid={'transparent'}
|
|
38
|
+
value={props.value}
|
|
39
|
+
multiline={true}
|
|
38
40
|
autoFocus={props.autoFocus}
|
|
39
|
-
multiline={true}
|
|
40
|
-
selectionColor={theme.colors.primary}
|
|
41
|
-
color={theme.colors.textGray}
|
|
42
41
|
/>
|
|
43
42
|
</Wrapper>
|
|
44
43
|
);
|