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,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.16.7",
3
+ "version": "0.16.8",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -1,8 +1,8 @@
1
1
  import React, { useState, useEffect } from 'react'
2
- import { Platform, StyleSheet, View } from 'react-native'
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 CheckBox from '@react-native-community/checkbox';
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
- <CheckBox
108
- value={checkedState[idx]}
109
- disabled={(cart?.balance === 0 && !checkedState[idx]) || wallet.balance === 0}
110
- boxType={'square'}
111
- tintColors={{
112
- true: theme.colors.primary,
113
- false: theme.colors.disabled
114
- }}
115
- onChange={() => handleOnChange(idx, wallet)}
116
- tintColor={theme.colors.disabled}
117
- onCheckColor={theme.colors.primary}
118
- onTintColor={theme.colors.primary}
119
- style={Platform.OS === 'ios' && styles.checkBoxStyle}
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