react-crud-mobile 1.3.19 → 1.3.20

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,5 +1,5 @@
1
1
  {
2
- "version": "1.3.19",
2
+ "version": "1.3.20",
3
3
  "license": "MIT",
4
4
  "description": "Uma biblioteca de componentes para React Native",
5
5
  "main": "dist/index.js",
@@ -1,11 +1,5 @@
1
- import { useRef, useState } from 'react';
2
- import {
3
- ChildType,
4
- MethodType,
5
- useTheme,
6
- Utils,
7
- ViewUtils,
8
- } from 'react-crud-utils';
1
+ import { useEffect, useRef, useState } from 'react';
2
+ import { ChildType, MethodType, Utils, ViewUtils } from 'react-crud-utils';
9
3
  import {
10
4
  Text,
11
5
  TouchableOpacity,
@@ -14,10 +8,10 @@ import {
14
8
  View,
15
9
  StatusBar,
16
10
  SafeAreaView,
17
- ScrollView,
18
11
  } from 'react-native';
19
12
  import { Ionicons } from '@expo/vector-icons';
20
13
  import UI from '../UI';
14
+ import MobileUtils from '../../utils/MobileUtils';
21
15
 
22
16
  export default function UISelect(props: ChildType) {
23
17
  const [modalVisible, setModalVisible] = useState(false);
@@ -51,7 +45,9 @@ export default function UISelect(props: ChildType) {
51
45
  };
52
46
 
53
47
  const style = (part: string, extra?: any) => {
54
- return { ...styles[part], ...scope.getStyle(part), ...extra };
48
+ let all = { ...styles[part], ...extra };
49
+
50
+ return scope.getStyle(part, all);
55
51
  };
56
52
 
57
53
  const isModalVisible = () => {
@@ -59,6 +55,10 @@ export default function UISelect(props: ChildType) {
59
55
  };
60
56
  //v1
61
57
 
58
+ useEffect(() => {
59
+ MobileUtils.syncTheme();
60
+ }, [modalVisible]);
61
+
62
62
  return (
63
63
  <View style={style('selectRoot')}>
64
64
  <TouchableOpacity onPress={handlePress} style={style('selectInput')}>
@@ -78,10 +78,6 @@ export default function UISelect(props: ChildType) {
78
78
  visible={isModalVisible()}
79
79
  onRequestClose={() => setModalVisible(false)}
80
80
  >
81
- <StatusBar
82
- barStyle="dark-content"
83
- backgroundColor={theme.colors.primary}
84
- />
85
81
  <SafeAreaView style={style('modalSafe')}>
86
82
  <View style={style('modalHeader')}>
87
83
  <TouchableOpacity