pcm-shared-components 0.0.33 → 0.0.34

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.
@@ -29,6 +29,16 @@ const useStyles = makeStyles(() => ({
29
29
  color: ({
30
30
  textColor
31
31
  }) => textColor
32
+ },
33
+ Icon: {
34
+ width: ({
35
+ iconSize
36
+ }) => iconSize,
37
+ height: ({
38
+ iconSize
39
+ }) => iconSize,
40
+ marginTop: 'auto',
41
+ marginBottom: 'auto'
32
42
  }
33
43
  }));
34
44
 
@@ -42,6 +52,7 @@ const CustomFab = props => {
42
52
  backgroundColor,
43
53
  color,
44
54
  Icon,
55
+ iconSize,
45
56
  buttonText,
46
57
  iconLocation
47
58
  } = props;
@@ -60,7 +71,9 @@ const CustomFab = props => {
60
71
  onClick: onClick
61
72
  }, /*#__PURE__*/React.createElement("div", {
62
73
  className: `flex ${iconLocation === 'left' ? 'flex-row' : 'flex-row-reverse'}`
63
- }, Icon && /*#__PURE__*/React.createElement(Icon, null), buttonText && buttonText.length > 0 && /*#__PURE__*/React.createElement("div", {
74
+ }, Icon && /*#__PURE__*/React.createElement(Icon, {
75
+ className: classes.Icon
76
+ }), buttonText && buttonText.length > 0 && /*#__PURE__*/React.createElement("div", {
64
77
  className: "mx-6"
65
78
  }, " ", buttonText)))));
66
79
  };
@@ -69,6 +82,7 @@ export default /*#__PURE__*/memo(CustomFab);
69
82
  CustomFab.defaultProps = {
70
83
  onClick: () => {},
71
84
  Icon: MoreVertIcon,
85
+ iconSize: 24,
72
86
  iconLocation: 'left',
73
87
  buttonText: '',
74
88
  variant: 'circular',
@@ -89,6 +103,9 @@ CustomFab.propTypes = {
89
103
  /** Icon to be used in the button */
90
104
  Icon: PropTypes.element,
91
105
 
106
+ /** Controls the size of the icon in pixels */
107
+ iconSize: PropTypes.number,
108
+
92
109
  /** Text inside of the button */
93
110
  buttonText: PropTypes.string,
94
111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {