@widergy/mobile-ui 1.4.0 → 1.4.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.4.1](https://github.com/widergy/mobile-ui/compare/v1.4.0...v1.4.1) (2024-04-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * minor fixes ([#271](https://github.com/widergy/mobile-ui/issues/271)) ([4cf7246](https://github.com/widergy/mobile-ui/commit/4cf724618ced022d4dbe515bf90395875957442d))
7
+
1
8
  # [1.4.0](https://github.com/widergy/mobile-ui/compare/v1.3.4...v1.4.0) (2024-03-26)
2
9
 
3
10
 
@@ -15,26 +15,27 @@ import ownStyles from './styles';
15
15
  import { CLOSE_ICON } from './constants';
16
16
 
17
17
  const UTModal = ({
18
- children,
19
- onRequestClose,
20
18
  acceptButton,
21
- cancelButton,
22
- visible,
23
- title,
24
- subtitle,
25
- subtitleProps = {},
26
- loading,
19
+ backgroundImg,
27
20
  backgroundStyles,
28
- imageStyles,
29
- disableTouchable,
30
- loadingText,
31
- modalBackgroundColor,
21
+ cancelButton,
22
+ children,
32
23
  color,
24
+ disableTouchable,
25
+ hideCloseButton,
26
+ hideSeparatorBar,
33
27
  imageComponent,
28
+ imageStyles,
34
29
  labelProps,
30
+ loading,
31
+ loadingText,
32
+ modalBackgroundColor,
35
33
  modalStyles,
36
- backgroundImg,
37
- hideSeparatorBar
34
+ onRequestClose,
35
+ subtitle,
36
+ subtitleProps = {},
37
+ title,
38
+ visible
38
39
  }) => {
39
40
  const theme = useTheme();
40
41
  const themeStyles = theme.simpleButton;
@@ -67,18 +68,20 @@ const UTModal = ({
67
68
  )}
68
69
  {!!imageComponent && (
69
70
  <View style={[styles.content, imageStyles]}>
70
- <Touchable
71
- borderless
72
- style={styles.closeIcon}
73
- onPress={onRequestClose || cancelButton.onPress}
74
- >
75
- <Icon name={CLOSE_ICON} color={color || 'black'} style={styles.iconSpacing} />
76
- </Touchable>
71
+ {!hideCloseButton && (
72
+ <Touchable
73
+ borderless
74
+ style={styles.closeIcon}
75
+ onPress={onRequestClose || cancelButton.onPress}
76
+ >
77
+ <Icon name={CLOSE_ICON} color={color || 'black'} style={styles.iconSpacing} />
78
+ </Touchable>
79
+ )}
77
80
  <View style={styles.imageContainer}>{imageComponent}</View>
78
81
  </View>
79
82
  )}
80
83
  <View style={styles.content}>
81
- {!backgroundImg && !imageComponent && (
84
+ {!backgroundImg && !imageComponent && !hideCloseButton && (
82
85
  <Touchable borderless style={styles.closeIcon} onPress={onRequestClose}>
83
86
  <Icon name={CLOSE_ICON} color={color || 'black'} style={styles.iconSpacing} />
84
87
  </Touchable>
@@ -6,30 +6,31 @@ import { IS_ANDROID } from '../../utils/platformUtils/constants';
6
6
 
7
7
  const buttonPropType = shape({
8
8
  backgroundColor: string,
9
- text: string,
10
- onPress: func,
11
9
  disabled: bool,
12
10
  loadingText: string,
11
+ onPress: func,
12
+ text: string,
13
13
  textColor: string
14
14
  });
15
15
 
16
16
  export default {
17
- onRequestClose: IS_ANDROID ? func.isRequired : func,
18
- cancelButton: buttonPropType,
19
17
  acceptButton: buttonPropType,
20
- visible: bool.isRequired,
21
- loading: bool,
22
- title: string,
18
+ backgroundImg: number,
19
+ backgroundStyles: ViewPropTypes.style,
20
+ cancelButton: buttonPropType,
23
21
  disableTouchable: bool,
24
- modalBackgroundColor: string,
25
- onKeyboardDismiss: func,
26
- loadingText: string,
27
22
  fill: string,
28
- imageStyles: ViewPropTypes.style,
29
- backgroundStyles: ViewPropTypes.style,
30
- modalStyles: ViewPropTypes.style,
23
+ hideCloseButton: bool,
31
24
  image: element,
32
- backgroundImg: number,
25
+ imageStyles: ViewPropTypes.style,
33
26
  labelProps: shape(bool),
34
- theme: themeType
27
+ loading: bool,
28
+ loadingText: string,
29
+ modalBackgroundColor: string,
30
+ modalStyles: ViewPropTypes.style,
31
+ onKeyboardDismiss: func,
32
+ onRequestClose: IS_ANDROID ? func.isRequired : func,
33
+ theme: themeType,
34
+ title: string,
35
+ visible: bool.isRequired
35
36
  };
@@ -20,6 +20,7 @@ const ActionButton = ({ hidden, disabled, onPress, label, mode, style }) => {
20
20
  lowerCase
21
21
  title={label}
22
22
  onPress={onPress}
23
+ contentStyle={themedStyles.buttonContent}
23
24
  containerStyle={themedStyles.buttonContainer}
24
25
  />
25
26
  </View>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@widergy/mobile-ui",
3
3
  "description": "Widergy Mobile Components",
4
4
  "author": "widergy",
5
- "version": "1.4.0",
5
+ "version": "1.4.1",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [