react-crud-mobile 1.0.710 → 1.0.711
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 +14 -2
- 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 +14 -2
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/elements/core/UIView.tsx +11 -2
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.711",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"description": "Uma biblioteca de componentes para React Native",
|
|
5
5
|
"main": "dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@react-native-vector-icons/ionicons": "^7.4.0",
|
|
45
45
|
"@react-native-vector-icons/material-icons": "^0.0.1",
|
|
46
46
|
"react": "19.0.0",
|
|
47
|
-
"react-crud-utils": "^0.1.
|
|
47
|
+
"react-crud-utils": "^0.1.279",
|
|
48
48
|
"react-dom": "19.0.0",
|
|
49
49
|
"react-native": "0.79.2",
|
|
50
50
|
"react-native-gesture-handler": "~2.24.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ScrollView, StyleSheet, View } from 'react-native';
|
|
1
|
+
import { ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
2
2
|
|
|
3
3
|
import UIChildren from '../UIChildren';
|
|
4
4
|
import { ChildType, useTheme, Utils, ViewUtils } from 'react-crud-utils';
|
|
@@ -9,6 +9,7 @@ export default function UIView({ scope, children }: ChildType) {
|
|
|
9
9
|
const theme = useTheme();
|
|
10
10
|
const header = scope.getPart('header', null, []);
|
|
11
11
|
const headerStyle = Utils.nvl(theme.styles?.defaults?.header, {});
|
|
12
|
+
const headerTextStyle = Utils.nvl(theme.styles?.defaults?.headerText, {});
|
|
12
13
|
|
|
13
14
|
useEffect(() => {
|
|
14
15
|
StatusBar.setBarStyle('light-content');
|
|
@@ -26,11 +27,19 @@ export default function UIView({ scope, children }: ChildType) {
|
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
let hasHeader = !Utils.isEmpty(header);
|
|
30
|
+
let AuxHeader = () => {
|
|
31
|
+
if (typeof header === 'string') {
|
|
32
|
+
return <Text style={headerTextStyle}>{header}</Text>;
|
|
33
|
+
}
|
|
34
|
+
return <>{header}</>;
|
|
35
|
+
};
|
|
29
36
|
|
|
30
37
|
return (
|
|
31
38
|
<>
|
|
32
39
|
{hasHeader && (
|
|
33
|
-
<View style={scope.getStyle('header', headerStyle)}>
|
|
40
|
+
<View style={scope.getStyle('header', headerStyle)}>
|
|
41
|
+
<AuxHeader />
|
|
42
|
+
</View>
|
|
34
43
|
)}
|
|
35
44
|
<View style={scope.getStyle('container', styles.container)}>
|
|
36
45
|
<ScrollView
|