react-crud-mobile 1.3.20 → 1.3.22

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.20",
2
+ "version": "1.3.22",
3
3
  "license": "MIT",
4
4
  "description": "Uma biblioteca de componentes para React Native",
5
5
  "main": "dist/index.js",
@@ -22,6 +22,7 @@ export default function UISelect(props: ChildType) {
22
22
  const value = scope.getDisplayValue();
23
23
  const main = ViewUtils.getCrud('view');
24
24
  const theme = scope.getTheme();
25
+ const headerStyle = Utils.nvl(theme.styles?.defaults?.header, {});
25
26
  const handlePress = () => {
26
27
  const _modalVisible = !modalVisible;
27
28
 
@@ -78,8 +79,9 @@ export default function UISelect(props: ChildType) {
78
79
  visible={isModalVisible()}
79
80
  onRequestClose={() => setModalVisible(false)}
80
81
  >
82
+ <SafeAreaView style={style('modalTop')} />
81
83
  <SafeAreaView style={style('modalSafe')}>
82
- <View style={style('modalHeader')}>
84
+ <View style={scope.getStyle('header', headerStyle)}>
83
85
  <TouchableOpacity
84
86
  onPress={() => setModalVisible(false)}
85
87
  style={style('modalCloseButton')}
@@ -113,16 +115,14 @@ const styles = StyleSheet.create({
113
115
  paddingVertical: 10,
114
116
  },
115
117
  selectLabel: { flex: 1 },
118
+ modalTop: {
119
+ backgroundColor: 'primary',
120
+ width: '100%',
121
+ },
116
122
  modalSafe: {
117
123
  flex: 1,
124
+ width: '100%',
118
125
  backgroundColor: 'background',
119
- paddingTop: StatusBar.currentHeight || 0, // Considera a altura da barra de status no Android
120
- },
121
- modalHeader: {
122
- flexDirection: 'row',
123
- alignItems: 'center',
124
- padding: 15,
125
- backgroundColor: 'theme',
126
126
  },
127
127
  modalCloseButton: {
128
128
  padding: 10,
@@ -133,16 +133,15 @@ const styles = StyleSheet.create({
133
133
  },
134
134
  modalTitle: {
135
135
  fontSize: 18,
136
- color: 'white',
137
136
  fontWeight: 'bold',
138
137
  marginLeft: 10,
139
138
  },
140
139
  modalContent: {
141
140
  flex: 1,
142
- width: '100%',
143
- alignSelf: 'flex-start',
144
- flexDirection: 'row',
145
- flexWrap: 'wrap',
146
- padding: 20,
141
+ backgroundColor: 'background',
142
+ paddingTop: 10,
143
+ paddingBottom: 10,
144
+ paddingLeft: 15,
145
+ paddingRight: 15,
147
146
  },
148
147
  });