@widergy/mobile-ui 1.3.0 → 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,17 @@
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
+
8
+ ## [1.3.1](https://github.com/widergy/mobile-ui/compare/v1.3.0...v1.3.1) (2024-03-13)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * action button styles ([#267](https://github.com/widergy/mobile-ui/issues/267)) ([133048b](https://github.com/widergy/mobile-ui/commit/133048b8f8adeeef25eb86179a4588d8ed048d37))
14
+
1
15
  # [1.3.0](https://github.com/widergy/mobile-ui/compare/v1.2.1...v1.3.0) (2024-03-11)
2
16
 
3
17
 
@@ -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>
@@ -4,11 +4,13 @@ import { View } from 'react-native';
4
4
  import _ from 'lodash';
5
5
 
6
6
  import Button from '../../../../../../../Button';
7
+ import { useTheme } from '../../../../../../../../theming';
7
8
 
8
9
  import ownStyles from './styles';
9
10
 
10
11
  const ActionButton = ({ hidden, disabled, onPress, label, mode, style }) => {
11
- const themedStyles = _.merge({}, ownStyles, style);
12
+ const theme = useTheme();
13
+ const themedStyles = _.merge({}, ownStyles, theme?.UTWorkflowContainer?.actionButton, style);
12
14
 
13
15
  return (
14
16
  <View style={themedStyles.actionButton}>
@@ -4,9 +4,6 @@ export default StyleSheet.create({
4
4
  actionButton: {
5
5
  flexGrow: 1
6
6
  },
7
- button: {
8
- width: '100%'
9
- },
10
7
  buttonContainer: {
11
8
  width: '100%'
12
9
  }
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.0",
5
+ "version": "1.3.2",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [