@eohjsc/react-native-smart-city 0.7.45 → 0.7.46
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 +1 -1
- package/src/commons/BottomButtonView/index.js +3 -0
- package/src/commons/SelectUnit/styles.js +1 -0
- package/src/commons/ViewButtonBottom/index.js +4 -1
- package/src/screens/AddNewGateway/SelectDeviceType.js +3 -3
- package/src/screens/AddNewGateway/SelectDeviceTypeStyles.js +2 -3
- package/src/screens/Sharing/Components/Styles/ShareDeviceSelectorStyles.js +2 -1
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { memo, useState, useEffect } from 'react';
|
|
2
2
|
import { StyleSheet, Animated, Easing, Platform } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
3
4
|
|
|
4
5
|
import { AccessibilityLabel } from '../../configs/Constants';
|
|
5
6
|
import useKeyboardAnimated from '../../hooks/Explore/useKeyboardAnimated';
|
|
@@ -26,6 +27,7 @@ const BottomButtonView = memo(
|
|
|
26
27
|
disableKeyBoardAnimated = false,
|
|
27
28
|
}) => {
|
|
28
29
|
const transY = useKeyboardAnimated();
|
|
30
|
+
const insets = useSafeAreaInsets();
|
|
29
31
|
const [keyboardAnim] = useState(new Animated.Value(0));
|
|
30
32
|
|
|
31
33
|
useEffect(() => {
|
|
@@ -46,6 +48,7 @@ const BottomButtonView = memo(
|
|
|
46
48
|
: styleCustom.container,
|
|
47
49
|
// eslint-disable-next-line react-native/no-inline-styles
|
|
48
50
|
{ bottom: disableKeyBoardAnimated ? 0.1 : keyboardAnim },
|
|
51
|
+
{ paddingBottom: insets.bottom },
|
|
49
52
|
rowButton && styleCustom.horizontalContainer,
|
|
50
53
|
style,
|
|
51
54
|
]}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
Platform,
|
|
7
7
|
Easing,
|
|
8
8
|
} from 'react-native';
|
|
9
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
9
10
|
|
|
10
11
|
import { Colors } from '../../configs';
|
|
11
12
|
import Text from '../../commons/Text';
|
|
@@ -35,6 +36,7 @@ const ViewButtonBottom = ({
|
|
|
35
36
|
}) => {
|
|
36
37
|
const useTwoButton = leftTitle && rightTitle;
|
|
37
38
|
const transY = useKeyboardAnimated();
|
|
39
|
+
const insets = useSafeAreaInsets();
|
|
38
40
|
const [keyboardAnim] = useState(new Animated.Value(0));
|
|
39
41
|
|
|
40
42
|
const RightButtonView = useMemo(() => {
|
|
@@ -56,6 +58,7 @@ const ViewButtonBottom = ({
|
|
|
56
58
|
styles.container,
|
|
57
59
|
wrapStyle,
|
|
58
60
|
!disableKeyBoardAnimated && { bottom: keyboardAnim },
|
|
61
|
+
{ paddingBottom: insets.bottom },
|
|
59
62
|
]}
|
|
60
63
|
>
|
|
61
64
|
{leftTitle && (
|
|
@@ -115,7 +118,7 @@ const styles = StyleSheet.create({
|
|
|
115
118
|
bottom: 0,
|
|
116
119
|
},
|
|
117
120
|
button: {
|
|
118
|
-
|
|
121
|
+
paddingBottom: 10,
|
|
119
122
|
width: '100%',
|
|
120
123
|
flex: 1,
|
|
121
124
|
justifyContent: 'center',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import { TouchableOpacity, View } from 'react-native';
|
|
2
|
+
import { ScrollView, TouchableOpacity, View } from 'react-native';
|
|
3
3
|
import { useNavigation } from '@react-navigation/native';
|
|
4
4
|
|
|
5
5
|
import { useTranslations } from '../../hooks/Common/useTranslations';
|
|
@@ -221,9 +221,9 @@ const SelectDeviceType = ({ route }) => {
|
|
|
221
221
|
return (
|
|
222
222
|
<View style={styles.container}>
|
|
223
223
|
<HeaderCustom title={t('choose_type_of_device')} isShowSeparator />
|
|
224
|
-
<
|
|
224
|
+
<ScrollView style={styles.contentContainer}>
|
|
225
225
|
<SelectDeviceGrid options={listDeviceType} onSelect={handleOnSelect} />
|
|
226
|
-
</
|
|
226
|
+
</ScrollView>
|
|
227
227
|
<ViewButtonBottom
|
|
228
228
|
leftTitle={t('cancel')}
|
|
229
229
|
onLeftClick={goBack}
|
|
@@ -9,9 +9,8 @@ export default StyleSheet.create({
|
|
|
9
9
|
backgroundColor: Colors.White,
|
|
10
10
|
},
|
|
11
11
|
contentContainer: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
paddingVertical: 16,
|
|
12
|
+
paddingTop: 16,
|
|
13
|
+
marginBottom: 48,
|
|
15
14
|
},
|
|
16
15
|
gridContainer: {
|
|
17
16
|
flexDirection: 'row',
|
|
@@ -13,6 +13,7 @@ export default StyleSheet.create({
|
|
|
13
13
|
contentContainer: {
|
|
14
14
|
flex: 1,
|
|
15
15
|
justifyContent: 'space-between',
|
|
16
|
+
paddingBottom: 40,
|
|
16
17
|
},
|
|
17
18
|
title: {
|
|
18
19
|
color: Colors.Gray9,
|
|
@@ -47,6 +48,6 @@ export default StyleSheet.create({
|
|
|
47
48
|
fontSize: 14,
|
|
48
49
|
},
|
|
49
50
|
wrapViewButtonStyle: {
|
|
50
|
-
paddingTop:
|
|
51
|
+
paddingTop: 48,
|
|
51
52
|
},
|
|
52
53
|
});
|