@widergy/mobile-ui 1.3.1 → 1.3.2

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.3.2](https://github.com/widergy/mobile-ui/compare/v1.3.1...v1.3.2) (2024-03-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * added iconContainer ([#266](https://github.com/widergy/mobile-ui/issues/266)) ([bfe9d47](https://github.com/widergy/mobile-ui/commit/bfe9d4733f51d876c45ff002d2dd64cbaac183b1))
7
+
1
8
  ## [1.3.1](https://github.com/widergy/mobile-ui/compare/v1.3.0...v1.3.1) (2024-03-13)
2
9
 
3
10
 
@@ -19,17 +19,18 @@ const Button = ({
19
19
  effectColor,
20
20
  elevation,
21
21
  icon,
22
- iconStyle,
22
+ iconContainerStyle,
23
23
  iconPlacement,
24
+ iconStyle,
24
25
  labelColor,
25
- testID,
26
26
  labelProps,
27
27
  lowerCase,
28
28
  mode,
29
29
  onPress,
30
+ outerContainerStyles,
30
31
  secondary,
32
+ testID,
31
33
  theme,
32
- outerContainerStyles,
33
34
  title
34
35
  }) => {
35
36
  const themeStyles = getThemeStyles(theme);
@@ -61,15 +62,17 @@ const Button = ({
61
62
  >
62
63
  <View style={[styles.button, contentStyle]}>
63
64
  {icon && iconPlacement !== ICON_PLACEMENTS.right && (
64
- <Icon
65
- color={textColor}
66
- name={icon.name}
67
- type={icon.type}
68
- style={[title && styles.leftIcon, iconStyle]}
69
- size={icon.size || themeStyles.fontSize}
70
- width={icon.width}
71
- height={icon.height}
72
- />
65
+ <View style={[title && styles.leftIcon, iconContainerStyle]}>
66
+ <Icon
67
+ color={textColor}
68
+ name={icon.name}
69
+ type={icon.type}
70
+ style={iconStyle}
71
+ size={icon.size || themeStyles.fontSize}
72
+ width={icon.width}
73
+ height={icon.height}
74
+ />
75
+ </View>
73
76
  )}
74
77
  {title && (
75
78
  <Label base color={textColor} {...labelProps}>
@@ -77,15 +80,17 @@ const Button = ({
77
80
  </Label>
78
81
  )}
79
82
  {icon && iconPlacement === ICON_PLACEMENTS.right && (
80
- <Icon
81
- color={textColor}
82
- name={icon.name}
83
- type={icon.type}
84
- style={[title && styles.rightIcon, iconStyle]}
85
- size={icon.size || themeStyles.fontSize}
86
- width={icon.width}
87
- height={icon.height}
88
- />
83
+ <View style={[title && styles.rightIcon, iconContainerStyle]}>
84
+ <Icon
85
+ color={textColor}
86
+ name={icon.name}
87
+ type={icon.type}
88
+ style={iconStyle}
89
+ size={icon.size || themeStyles.fontSize}
90
+ width={icon.width}
91
+ height={icon.height}
92
+ />
93
+ </View>
89
94
  )}
90
95
  </View>
91
96
  </Touchable>
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.3.1",
5
+ "version": "1.3.2",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [