react-crud-mobile 1.0.684 → 1.0.686

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.0.684",
2
+ "version": "1.0.686",
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.268",
47
+ "react-crud-utils": "^0.1.270",
48
48
  "react-dom": "19.0.0",
49
49
  "react-native": "0.79.2",
50
50
  "react-native-gesture-handler": "~2.24.0",
@@ -28,6 +28,7 @@ export default function UIModal(props: ChildType) {
28
28
  const scope = props.scope;
29
29
  const label = scope.getLabel();
30
30
  const theme = useTheme();
31
+ const headerStyle = Utils.nvl(theme.styles?.defaults?.header, {});
31
32
 
32
33
  const style = (part: string, extra?: any) => {
33
34
  let st = { ...styles[part], ...extra };
@@ -122,7 +123,7 @@ export default function UIModal(props: ChildType) {
122
123
  onRequestClose={onClose}
123
124
  >
124
125
  <SafeAreaView style={style('modalSafe')}>
125
- <View style={style('modalHeader')}>
126
+ <View style={scope.getStyle('header', headerStyle)}>
126
127
  <TouchableOpacity onPress={onClose} style={style('modalCloseButton')}>
127
128
  <Text style={style('modalCloseText')}>X</Text>
128
129
  </TouchableOpacity>
@@ -154,16 +155,6 @@ const styles = StyleSheet.create({
154
155
  backgroundColor: 'primary',
155
156
  width: '100%',
156
157
  },
157
- modalHeader: {
158
- height: 58,
159
- flexWrap: 'nowrap',
160
- flexDirection: 'row',
161
- alignContent: 'center',
162
- justifyContent: 'flex-start',
163
- alignItems: 'center',
164
- padding: 15,
165
- backgroundColor: 'primary',
166
- },
167
158
  modalCloseButton: {
168
159
  padding: 10,
169
160
  },
@@ -8,6 +8,7 @@ import { StatusBar } from 'react-native';
8
8
  export default function UIView({ scope, children }: ChildType) {
9
9
  const theme = useTheme();
10
10
  const header = scope.getPart('header', null, []);
11
+ const headerStyle = Utils.nvl(theme.styles?.defaults?.header, {});
11
12
 
12
13
  useEffect(() => {
13
14
  StatusBar.setBarStyle('light-content');
@@ -29,19 +30,7 @@ export default function UIView({ scope, children }: ChildType) {
29
30
  return (
30
31
  <>
31
32
  {hasHeader && (
32
- <View
33
- style={{
34
- padding: 20,
35
- height: 58,
36
- flexWrap: 'nowrap',
37
- flexDirection: 'row',
38
- alignContent: 'center',
39
- justifyContent: 'flex-start',
40
- alignItems: 'center',
41
- }}
42
- >
43
- {header}
44
- </View>
33
+ <View style={scope.getStyle('header', headerStyle)}>{header}</View>
45
34
  )}
46
35
  <View style={scope.getStyle('container', styles.container)}>
47
36
  <ScrollView