ordering-ui-react-native 0.16.7 → 0.16.8
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,8 +1,8 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import {
|
|
2
|
+
import { View } from 'react-native'
|
|
3
3
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
4
4
|
import { useTheme } from 'styled-components/native'
|
|
5
|
-
import
|
|
5
|
+
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
6
6
|
import {
|
|
7
7
|
PaymentOptionWallet as PaymentOptionWalletController,
|
|
8
8
|
useLanguage,
|
|
@@ -41,13 +41,6 @@ const PaymentOptionWalletUI = (props: any) => {
|
|
|
41
41
|
const isBusinessWalletCashEnabled = businessConfigs.find((config: any) => config.key === 'wallet_cash_enabled')?.value === '1'
|
|
42
42
|
const isBusinessWalletPointsEnabled = businessConfigs.find((config: any) => config.key === 'wallet_credit_point_enabled')?.value === '1'
|
|
43
43
|
|
|
44
|
-
const styles = StyleSheet.create({
|
|
45
|
-
checkBoxStyle: {
|
|
46
|
-
width: 25,
|
|
47
|
-
height: 25,
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
|
|
51
44
|
const [checkedState, setCheckedState] = useState(
|
|
52
45
|
new Array(walletsState.result?.length).fill(false)
|
|
53
46
|
);
|
|
@@ -104,20 +97,19 @@ const PaymentOptionWalletUI = (props: any) => {
|
|
|
104
97
|
disabled={(cart?.balance === 0 && !checkedState[idx]) || wallet.balance === 0}
|
|
105
98
|
>
|
|
106
99
|
<SectionLeft>
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
/>
|
|
100
|
+
{checkedState[idx] ? (
|
|
101
|
+
<MaterialCommunityIcons
|
|
102
|
+
name="checkbox-marked"
|
|
103
|
+
size={25}
|
|
104
|
+
color={theme.colors.primary}
|
|
105
|
+
/>
|
|
106
|
+
) : (
|
|
107
|
+
<MaterialCommunityIcons
|
|
108
|
+
name="checkbox-blank-outline"
|
|
109
|
+
size={25}
|
|
110
|
+
color={theme.colors.disabled}
|
|
111
|
+
/>
|
|
112
|
+
)}
|
|
121
113
|
<View style={{ alignItems: 'baseline', marginLeft: 5 }}>
|
|
122
114
|
<View>
|
|
123
115
|
<OText
|