react-crud-mobile 1.3.315 → 1.3.317
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/dist/react-crud-mobile.cjs.development.js +7 -6
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +7 -6
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/elements/UIElement.tsx +3 -2
- package/src/elements/core/UIAutoComplete.tsx +17 -17
- package/src/elements/core/UILink.tsx +17 -17
- package/src/elements/core/UIListItem.tsx +32 -32
- package/src/elements/core/UIOption.tsx +17 -17
- package/src/elements/core/UIRadio.tsx +17 -17
- package/src/elements/core/UISlider.tsx +61 -61
- package/src/elements/core/UIStatusBar.tsx +5 -5
- package/src/elements/core/UISwitch.tsx +27 -27
- package/src/elements/core/UIToggle.tsx +3 -3
- package/src/hooks/useIsVisible.ts +39 -39
- package/src/utils/MobileUtils.ts +12 -12
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-crud-mobile",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.317",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Uma biblioteca de componentes para React Native v1",
|
6
6
|
"main": "dist/index.js",
|
@@ -46,7 +46,7 @@
|
|
46
46
|
"@react-native-vector-icons/material-icons": "^0.0.1",
|
47
47
|
"expo-status-bar": "~3.0.8",
|
48
48
|
"react": "19.1.0",
|
49
|
-
"react-crud-utils": "^0.1.
|
49
|
+
"react-crud-utils": "^0.1.448",
|
50
50
|
"react-dom": "19.1.0",
|
51
51
|
"react-native": "0.81.4",
|
52
52
|
"react-native-draggable-flatlist": "^4.0.3",
|
@@ -825,6 +825,9 @@ elementStyle.quantity = {
|
|
825
825
|
};
|
826
826
|
|
827
827
|
elementStyle.toggle = StyleSheet.create({
|
828
|
+
root: {
|
829
|
+
height: 45,
|
830
|
+
},
|
828
831
|
inner: {
|
829
832
|
...box,
|
830
833
|
flex: 1,
|
@@ -832,8 +835,6 @@ elementStyle.toggle = StyleSheet.create({
|
|
832
835
|
gap: 10,
|
833
836
|
justifyContent: 'center',
|
834
837
|
flexDirection: 'row',
|
835
|
-
paddingHorizontal: 10,
|
836
|
-
paddingVertical: 0,
|
837
838
|
alignSelf: 'flex-start',
|
838
839
|
flexWrap: 'nowrap',
|
839
840
|
},
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
2
|
-
|
3
|
-
export default function UIAutoComplete(props: any) {
|
4
|
-
const handlePress = () => {
|
5
|
-
Linking.openURL('https://reactnative.dev/');
|
6
|
-
};
|
7
|
-
|
8
|
-
return (
|
9
|
-
<TouchableOpacity onPress={handlePress}>
|
10
|
-
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
11
|
-
</TouchableOpacity>
|
12
|
-
);
|
13
|
-
}
|
14
|
-
|
15
|
-
const styles = {
|
16
|
-
link: {},
|
17
|
-
};
|
1
|
+
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
2
|
+
|
3
|
+
export default function UIAutoComplete(props: any) {
|
4
|
+
const handlePress = () => {
|
5
|
+
Linking.openURL('https://reactnative.dev/');
|
6
|
+
};
|
7
|
+
|
8
|
+
return (
|
9
|
+
<TouchableOpacity onPress={handlePress}>
|
10
|
+
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
11
|
+
</TouchableOpacity>
|
12
|
+
);
|
13
|
+
}
|
14
|
+
|
15
|
+
const styles = {
|
16
|
+
link: {},
|
17
|
+
};
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
2
|
-
|
3
|
-
export default function UILink(props: any) {
|
4
|
-
const handlePress = () => {
|
5
|
-
Linking.openURL('https://reactnative.dev/');
|
6
|
-
};
|
7
|
-
|
8
|
-
return (
|
9
|
-
<TouchableOpacity onPress={handlePress}>
|
10
|
-
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
11
|
-
</TouchableOpacity>
|
12
|
-
);
|
13
|
-
}
|
14
|
-
|
15
|
-
const styles = {
|
16
|
-
link: {},
|
17
|
-
};
|
1
|
+
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
2
|
+
|
3
|
+
export default function UILink(props: any) {
|
4
|
+
const handlePress = () => {
|
5
|
+
Linking.openURL('https://reactnative.dev/');
|
6
|
+
};
|
7
|
+
|
8
|
+
return (
|
9
|
+
<TouchableOpacity onPress={handlePress}>
|
10
|
+
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
11
|
+
</TouchableOpacity>
|
12
|
+
);
|
13
|
+
}
|
14
|
+
|
15
|
+
const styles = {
|
16
|
+
link: {},
|
17
|
+
};
|
@@ -1,32 +1,32 @@
|
|
1
|
-
import { useState } from 'react';
|
2
|
-
import { ChildType, Utils } from 'react-crud-utils';
|
3
|
-
import { FlatList, StyleSheet, Switch, Text, View } from 'react-native';
|
4
|
-
|
5
|
-
interface UIListItemType extends ChildType {
|
6
|
-
data: any;
|
7
|
-
}
|
8
|
-
|
9
|
-
export default function UIListItem(props: UIListItemType) {
|
10
|
-
const scope = props.scope;
|
11
|
-
const crud = props.crud;
|
12
|
-
|
13
|
-
return <View style={styles.item}></View>;
|
14
|
-
}
|
15
|
-
|
16
|
-
const styles = StyleSheet.create({
|
17
|
-
container: {
|
18
|
-
flex: 1,
|
19
|
-
padding: 20,
|
20
|
-
backgroundColor: '#fff',
|
21
|
-
},
|
22
|
-
item: {
|
23
|
-
padding: 15,
|
24
|
-
marginVertical: 8,
|
25
|
-
backgroundColor: '#f9c2ff',
|
26
|
-
borderRadius: 8,
|
27
|
-
},
|
28
|
-
text: {
|
29
|
-
fontSize: 18,
|
30
|
-
fontWeight: 'bold',
|
31
|
-
},
|
32
|
-
});
|
1
|
+
import { useState } from 'react';
|
2
|
+
import { ChildType, Utils } from 'react-crud-utils';
|
3
|
+
import { FlatList, StyleSheet, Switch, Text, View } from 'react-native';
|
4
|
+
|
5
|
+
interface UIListItemType extends ChildType {
|
6
|
+
data: any;
|
7
|
+
}
|
8
|
+
|
9
|
+
export default function UIListItem(props: UIListItemType) {
|
10
|
+
const scope = props.scope;
|
11
|
+
const crud = props.crud;
|
12
|
+
|
13
|
+
return <View style={styles.item}></View>;
|
14
|
+
}
|
15
|
+
|
16
|
+
const styles = StyleSheet.create({
|
17
|
+
container: {
|
18
|
+
flex: 1,
|
19
|
+
padding: 20,
|
20
|
+
backgroundColor: '#fff',
|
21
|
+
},
|
22
|
+
item: {
|
23
|
+
padding: 15,
|
24
|
+
marginVertical: 8,
|
25
|
+
backgroundColor: '#f9c2ff',
|
26
|
+
borderRadius: 8,
|
27
|
+
},
|
28
|
+
text: {
|
29
|
+
fontSize: 18,
|
30
|
+
fontWeight: 'bold',
|
31
|
+
},
|
32
|
+
});
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
2
|
-
|
3
|
-
export default function UIOption(props: any) {
|
4
|
-
const handlePress = () => {
|
5
|
-
Linking.openURL('https://reactnative.dev/');
|
6
|
-
};
|
7
|
-
|
8
|
-
return (
|
9
|
-
<TouchableOpacity onPress={handlePress}>
|
10
|
-
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
11
|
-
</TouchableOpacity>
|
12
|
-
);
|
13
|
-
}
|
14
|
-
|
15
|
-
const styles = {
|
16
|
-
link: {},
|
17
|
-
};
|
1
|
+
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
2
|
+
|
3
|
+
export default function UIOption(props: any) {
|
4
|
+
const handlePress = () => {
|
5
|
+
Linking.openURL('https://reactnative.dev/');
|
6
|
+
};
|
7
|
+
|
8
|
+
return (
|
9
|
+
<TouchableOpacity onPress={handlePress}>
|
10
|
+
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
11
|
+
</TouchableOpacity>
|
12
|
+
);
|
13
|
+
}
|
14
|
+
|
15
|
+
const styles = {
|
16
|
+
link: {},
|
17
|
+
};
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
2
|
-
|
3
|
-
export default function UIRadio(props: any) {
|
4
|
-
const handlePress = () => {
|
5
|
-
Linking.openURL('https://reactnative.dev/');
|
6
|
-
};
|
7
|
-
|
8
|
-
return (
|
9
|
-
<TouchableOpacity onPress={handlePress}>
|
10
|
-
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
11
|
-
</TouchableOpacity>
|
12
|
-
);
|
13
|
-
}
|
14
|
-
|
15
|
-
const styles = {
|
16
|
-
link: {},
|
17
|
-
};
|
1
|
+
import { Text, TouchableOpacity, Linking, StyleSheet } from 'react-native';
|
2
|
+
|
3
|
+
export default function UIRadio(props: any) {
|
4
|
+
const handlePress = () => {
|
5
|
+
Linking.openURL('https://reactnative.dev/');
|
6
|
+
};
|
7
|
+
|
8
|
+
return (
|
9
|
+
<TouchableOpacity onPress={handlePress}>
|
10
|
+
<Text style={styles.link}>Clique aqui para acessar o React Native</Text>
|
11
|
+
</TouchableOpacity>
|
12
|
+
);
|
13
|
+
}
|
14
|
+
|
15
|
+
const styles = {
|
16
|
+
link: {},
|
17
|
+
};
|
@@ -1,61 +1,61 @@
|
|
1
|
-
import { useState } from 'react';
|
2
|
-
import { ChildType, ComponentUtils, Utils } from 'react-crud-utils';
|
3
|
-
import { Switch } from 'react-native';
|
4
|
-
import Slider from '@react-native-community/slider';
|
5
|
-
|
6
|
-
export default function UISlider(props: ChildType) {
|
7
|
-
const scope = props.scope;
|
8
|
-
const initial = Utils.nvl(scope.getValue(), 0);
|
9
|
-
const [value, setValue] = useState(initial);
|
10
|
-
|
11
|
-
//redeploy 0
|
12
|
-
|
13
|
-
let onChange = v => {
|
14
|
-
v = Utils.nvl(v, 0);
|
15
|
-
|
16
|
-
console.log(v);
|
17
|
-
|
18
|
-
scope.changeValue(v);
|
19
|
-
|
20
|
-
setValue(v);
|
21
|
-
};
|
22
|
-
|
23
|
-
let step = scope.attr('step', 1);
|
24
|
-
let min = scope.attr('min', 0);
|
25
|
-
let max = scope.attr('min', 100);
|
26
|
-
|
27
|
-
let onSlideScroll = (scrollEnabled: boolean) => {
|
28
|
-
let viewScope = ComponentUtils.getViewScope();
|
29
|
-
|
30
|
-
if (scope.original.debug) {
|
31
|
-
console.log(viewScope);
|
32
|
-
}
|
33
|
-
|
34
|
-
if (viewScope) {
|
35
|
-
let scrollRef = viewScope.get('scrollRef');
|
36
|
-
|
37
|
-
if (scrollRef) scrollRef.current?.setNativeProps?.({ scrollEnabled });
|
38
|
-
}
|
39
|
-
};
|
40
|
-
return (
|
41
|
-
<>
|
42
|
-
<Slider
|
43
|
-
minimumValue={min}
|
44
|
-
maximumValue={max}
|
45
|
-
step={step}
|
46
|
-
minimumTrackTintColor="#1EB1FC"
|
47
|
-
maximumTrackTintColor="#d3d3d3"
|
48
|
-
thumbTintColor="#1EB1FC"
|
49
|
-
value={value}
|
50
|
-
onSlidingStart={() => onSlideScroll(false)}
|
51
|
-
onSlidingComplete={() => onSlideScroll(true)}
|
52
|
-
style={{ width: '100%', height: 40, ...scope.getStyle('element') }}
|
53
|
-
onValueChange={onChange} // Alterna o estado
|
54
|
-
/>
|
55
|
-
</>
|
56
|
-
);
|
57
|
-
}
|
58
|
-
|
59
|
-
const styles = {
|
60
|
-
link: {},
|
61
|
-
};
|
1
|
+
import { useState } from 'react';
|
2
|
+
import { ChildType, ComponentUtils, Utils } from 'react-crud-utils';
|
3
|
+
import { Switch } from 'react-native';
|
4
|
+
import Slider from '@react-native-community/slider';
|
5
|
+
|
6
|
+
export default function UISlider(props: ChildType) {
|
7
|
+
const scope = props.scope;
|
8
|
+
const initial = Utils.nvl(scope.getValue(), 0);
|
9
|
+
const [value, setValue] = useState(initial);
|
10
|
+
|
11
|
+
//redeploy 0
|
12
|
+
|
13
|
+
let onChange = v => {
|
14
|
+
v = Utils.nvl(v, 0);
|
15
|
+
|
16
|
+
console.log(v);
|
17
|
+
|
18
|
+
scope.changeValue(v);
|
19
|
+
|
20
|
+
setValue(v);
|
21
|
+
};
|
22
|
+
|
23
|
+
let step = scope.attr('step', 1);
|
24
|
+
let min = scope.attr('min', 0);
|
25
|
+
let max = scope.attr('min', 100);
|
26
|
+
|
27
|
+
let onSlideScroll = (scrollEnabled: boolean) => {
|
28
|
+
let viewScope = ComponentUtils.getViewScope();
|
29
|
+
|
30
|
+
if (scope.original.debug) {
|
31
|
+
console.log(viewScope);
|
32
|
+
}
|
33
|
+
|
34
|
+
if (viewScope) {
|
35
|
+
let scrollRef = viewScope.get('scrollRef');
|
36
|
+
|
37
|
+
if (scrollRef) scrollRef.current?.setNativeProps?.({ scrollEnabled });
|
38
|
+
}
|
39
|
+
};
|
40
|
+
return (
|
41
|
+
<>
|
42
|
+
<Slider
|
43
|
+
minimumValue={min}
|
44
|
+
maximumValue={max}
|
45
|
+
step={step}
|
46
|
+
minimumTrackTintColor="#1EB1FC"
|
47
|
+
maximumTrackTintColor="#d3d3d3"
|
48
|
+
thumbTintColor="#1EB1FC"
|
49
|
+
value={value}
|
50
|
+
onSlidingStart={() => onSlideScroll(false)}
|
51
|
+
onSlidingComplete={() => onSlideScroll(true)}
|
52
|
+
style={{ width: '100%', height: 40, ...scope.getStyle('element') }}
|
53
|
+
onValueChange={onChange} // Alterna o estado
|
54
|
+
/>
|
55
|
+
</>
|
56
|
+
);
|
57
|
+
}
|
58
|
+
|
59
|
+
const styles = {
|
60
|
+
link: {},
|
61
|
+
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { StatusBar } from 'expo-status-bar';
|
2
|
-
|
3
|
-
export default function UIStatusBar() {
|
4
|
-
return <StatusBar style="dark" backgroundColor="#f5f5f5" />;
|
5
|
-
}
|
1
|
+
import { StatusBar } from 'expo-status-bar';
|
2
|
+
|
3
|
+
export default function UIStatusBar() {
|
4
|
+
return <StatusBar style="dark" backgroundColor="#f5f5f5" />;
|
5
|
+
}
|
@@ -1,27 +1,27 @@
|
|
1
|
-
import { useState } from 'react';
|
2
|
-
import { ChildType, Utils } from 'react-crud-utils';
|
3
|
-
import { Switch } from 'react-native';
|
4
|
-
|
5
|
-
export default function UISwitch(props: ChildType) {
|
6
|
-
const scope = props.scope;
|
7
|
-
const initial = Utils.nvl(scope.getValue(), false) as boolean;
|
8
|
-
const [value, setValue] = useState(initial);
|
9
|
-
|
10
|
-
let onChange = v => {
|
11
|
-
scope.changeValue(v);
|
12
|
-
|
13
|
-
setValue(v);
|
14
|
-
};
|
15
|
-
|
16
|
-
return (
|
17
|
-
<Switch
|
18
|
-
value={value}
|
19
|
-
style={scope.getStyle('element')}
|
20
|
-
onValueChange={onChange} // Alterna o estado
|
21
|
-
/>
|
22
|
-
);
|
23
|
-
}
|
24
|
-
|
25
|
-
const styles = {
|
26
|
-
link: {},
|
27
|
-
};
|
1
|
+
import { useState } from 'react';
|
2
|
+
import { ChildType, Utils } from 'react-crud-utils';
|
3
|
+
import { Switch } from 'react-native';
|
4
|
+
|
5
|
+
export default function UISwitch(props: ChildType) {
|
6
|
+
const scope = props.scope;
|
7
|
+
const initial = Utils.nvl(scope.getValue(), false) as boolean;
|
8
|
+
const [value, setValue] = useState(initial);
|
9
|
+
|
10
|
+
let onChange = v => {
|
11
|
+
scope.changeValue(v);
|
12
|
+
|
13
|
+
setValue(v);
|
14
|
+
};
|
15
|
+
|
16
|
+
return (
|
17
|
+
<Switch
|
18
|
+
value={value}
|
19
|
+
style={scope.getStyle('element')}
|
20
|
+
onValueChange={onChange} // Alterna o estado
|
21
|
+
/>
|
22
|
+
);
|
23
|
+
}
|
24
|
+
|
25
|
+
const styles = {
|
26
|
+
link: {},
|
27
|
+
};
|
@@ -85,13 +85,13 @@ const styles = StyleSheet.create({
|
|
85
85
|
gap: 10,
|
86
86
|
justifyContent: 'center',
|
87
87
|
flexDirection: 'row',
|
88
|
+
alignItems: 'center',
|
88
89
|
},
|
89
90
|
item: {
|
90
|
-
|
91
|
-
marginVertical: 8,
|
91
|
+
margin: 5,
|
92
92
|
backgroundColor: 'background',
|
93
|
-
borderRadius: 8,
|
94
93
|
justifyContent: 'center',
|
94
|
+
alignItems: 'center',
|
95
95
|
width: 'auto',
|
96
96
|
flexDirection: 'row',
|
97
97
|
},
|
@@ -1,39 +1,39 @@
|
|
1
|
-
import { useEffect, useState } from 'react';
|
2
|
-
import { Scope } from 'react-crud-utils';
|
3
|
-
import { Dimensions, Platform } from 'react-native';
|
4
|
-
|
5
|
-
export function useIsVisible(ref: any, scope: Scope) {
|
6
|
-
const [isVisible, setIsVisible] = useState(scope.visible === true);
|
7
|
-
|
8
|
-
useEffect(() => {
|
9
|
-
const checkVisibility = () => {
|
10
|
-
if (!ref.current || isVisible || !scope.original?.useIsInView) return;
|
11
|
-
|
12
|
-
if (Platform.OS === 'web') {
|
13
|
-
const rect = ref.current.getBoundingClientRect?.();
|
14
|
-
|
15
|
-
if (rect && typeof window !== 'undefined') {
|
16
|
-
const windowHeight = window.innerHeight;
|
17
|
-
const visible = rect.top < windowHeight && rect.bottom > 0;
|
18
|
-
|
19
|
-
if (visible) scope.visible = visible;
|
20
|
-
|
21
|
-
setIsVisible(visible);
|
22
|
-
}
|
23
|
-
} else {
|
24
|
-
ref.current.measureInWindow?.((x, y, width, height) => {
|
25
|
-
const windowHeight = Dimensions.get('window').height;
|
26
|
-
const visible = y < windowHeight && y + height > 0;
|
27
|
-
|
28
|
-
if (visible) scope.visible = visible;
|
29
|
-
setIsVisible(visible);
|
30
|
-
});
|
31
|
-
}
|
32
|
-
};
|
33
|
-
|
34
|
-
const interval = setInterval(checkVisibility, 300); // roda a cada 300ms
|
35
|
-
return () => clearInterval(interval);
|
36
|
-
}, [ref]);
|
37
|
-
|
38
|
-
return isVisible;
|
39
|
-
}
|
1
|
+
import { useEffect, useState } from 'react';
|
2
|
+
import { Scope } from 'react-crud-utils';
|
3
|
+
import { Dimensions, Platform } from 'react-native';
|
4
|
+
|
5
|
+
export function useIsVisible(ref: any, scope: Scope) {
|
6
|
+
const [isVisible, setIsVisible] = useState(scope.visible === true);
|
7
|
+
|
8
|
+
useEffect(() => {
|
9
|
+
const checkVisibility = () => {
|
10
|
+
if (!ref.current || isVisible || !scope.original?.useIsInView) return;
|
11
|
+
|
12
|
+
if (Platform.OS === 'web') {
|
13
|
+
const rect = ref.current.getBoundingClientRect?.();
|
14
|
+
|
15
|
+
if (rect && typeof window !== 'undefined') {
|
16
|
+
const windowHeight = window.innerHeight;
|
17
|
+
const visible = rect.top < windowHeight && rect.bottom > 0;
|
18
|
+
|
19
|
+
if (visible) scope.visible = visible;
|
20
|
+
|
21
|
+
setIsVisible(visible);
|
22
|
+
}
|
23
|
+
} else {
|
24
|
+
ref.current.measureInWindow?.((x, y, width, height) => {
|
25
|
+
const windowHeight = Dimensions.get('window').height;
|
26
|
+
const visible = y < windowHeight && y + height > 0;
|
27
|
+
|
28
|
+
if (visible) scope.visible = visible;
|
29
|
+
setIsVisible(visible);
|
30
|
+
});
|
31
|
+
}
|
32
|
+
};
|
33
|
+
|
34
|
+
const interval = setInterval(checkVisibility, 300); // roda a cada 300ms
|
35
|
+
return () => clearInterval(interval);
|
36
|
+
}, [ref]);
|
37
|
+
|
38
|
+
return isVisible;
|
39
|
+
}
|
package/src/utils/MobileUtils.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
//import { ThemeUtils, Utils } from 'react-crud-utils';
|
2
|
-
//import { StatusBar } from 'react-native';
|
3
|
-
|
4
|
-
export default class MobileUtils {
|
5
|
-
static syncTheme() {
|
6
|
-
// let current = ThemeUtils.getCurrentTheme();
|
7
|
-
//let dec: any = { light: 'light-content', dark: 'dark-content' };
|
8
|
-
//let name = Utils.nvl(dec[current?.theme], dec.light);
|
9
|
-
//StatusBar.setBarStyle?.(name);
|
10
|
-
//StatusBar.setBackgroundColor?.(current?.colors?.theme);
|
11
|
-
}
|
12
|
-
}
|
1
|
+
//import { ThemeUtils, Utils } from 'react-crud-utils';
|
2
|
+
//import { StatusBar } from 'react-native';
|
3
|
+
|
4
|
+
export default class MobileUtils {
|
5
|
+
static syncTheme() {
|
6
|
+
// let current = ThemeUtils.getCurrentTheme();
|
7
|
+
//let dec: any = { light: 'light-content', dark: 'dark-content' };
|
8
|
+
//let name = Utils.nvl(dec[current?.theme], dec.light);
|
9
|
+
//StatusBar.setBarStyle?.(name);
|
10
|
+
//StatusBar.setBackgroundColor?.(current?.colors?.theme);
|
11
|
+
}
|
12
|
+
}
|