react-crud-mobile 1.0.685 → 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.
@@ -1108,7 +1108,7 @@ function UIQuantity(props) {
1108
1108
  }
1109
1109
 
1110
1110
  function UIModal(props) {
1111
- var _main$dialog2;
1111
+ var _theme$styles, _main$dialog2;
1112
1112
  var _useState = React.useState(false),
1113
1113
  modalVisible = _useState[0],
1114
1114
  setModalVisible = _useState[1];
@@ -1119,6 +1119,7 @@ function UIModal(props) {
1119
1119
  var scope = props.scope;
1120
1120
  var label = scope.getLabel();
1121
1121
  var theme = reactCrudUtils.useTheme();
1122
+ var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
1122
1123
  var style = function style(part, extra) {
1123
1124
  var st = _extends({}, styles$8[part], extra);
1124
1125
  return _extends({}, scope.getStyle(part, st));
@@ -1195,7 +1196,7 @@ function UIModal(props) {
1195
1196
  children: /*#__PURE__*/jsxRuntime.jsxs(reactNative.SafeAreaView, {
1196
1197
  style: style('modalSafe'),
1197
1198
  children: [/*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
1198
- style: style('modalHeader'),
1199
+ style: scope.getStyle('header', headerStyle),
1199
1200
  children: [/*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
1200
1201
  onPress: onClose,
1201
1202
  style: style('modalCloseButton'),
@@ -1258,10 +1259,12 @@ var styles$8 = /*#__PURE__*/reactNative.StyleSheet.create({
1258
1259
  });
1259
1260
 
1260
1261
  function UIView(_ref) {
1262
+ var _theme$styles;
1261
1263
  var scope = _ref.scope,
1262
1264
  children = _ref.children;
1263
1265
  var theme = reactCrudUtils.useTheme();
1264
1266
  var header = scope.getPart('header', null, []);
1267
+ var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
1265
1268
  React.useEffect(function () {
1266
1269
  reactNative.StatusBar.setBarStyle('light-content');
1267
1270
  reactNative.StatusBar.setBackgroundColor == null || reactNative.StatusBar.setBackgroundColor(theme.colors.primary);
@@ -1277,15 +1280,7 @@ function UIView(_ref) {
1277
1280
  var hasHeader = !reactCrudUtils.Utils.isEmpty(header);
1278
1281
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1279
1282
  children: [hasHeader && /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
1280
- style: {
1281
- padding: 20,
1282
- height: 58,
1283
- flexWrap: 'nowrap',
1284
- flexDirection: 'row',
1285
- alignContent: 'center',
1286
- justifyContent: 'flex-start',
1287
- alignItems: 'center'
1288
- },
1283
+ style: scope.getStyle('header', headerStyle),
1289
1284
  children: header
1290
1285
  }), /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
1291
1286
  style: scope.getStyle('container', styles$9.container),