pcm-shared-components 0.0.138 → 0.0.139

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.
@@ -31,6 +31,7 @@ export const DropdownButton = props => {
31
31
  menuData,
32
32
  variant,
33
33
  size,
34
+ menuAnchorLocation,
34
35
  theme
35
36
  } = props;
36
37
  const compTheme = theme ? theme : useTheme();
@@ -38,7 +39,8 @@ export const DropdownButton = props => {
38
39
  return /*#__PURE__*/React.createElement(ThemeProvider, {
39
40
  theme: defaultTheme
40
41
  }, /*#__PURE__*/React.createElement(ReusablePopupMenu, _extends({}, menuData, {
41
- theme: defaultTheme
42
+ theme: defaultTheme,
43
+ menuAnchorLocation: menuAnchorLocation
42
44
  }), /*#__PURE__*/React.createElement(Button, {
43
45
  variant: variant,
44
46
  className: className,
@@ -55,7 +57,8 @@ DropdownButton.defaultProps = {
55
57
  color: 'primary',
56
58
  className: '',
57
59
  variant: 'text',
58
- theme: {}
60
+ theme: {},
61
+ menuAnchorLocation: 'right'
59
62
  };
60
63
  DropdownButton.propTypes = {
61
64
  /** Name of the till being used. Note: if till name exist then inUse is true */
@@ -77,5 +80,8 @@ DropdownButton.propTypes = {
77
80
  size: PropTypes.oneOf(['small', 'medium', 'large']),
78
81
 
79
82
  /** Theme object to use on this component, if none provided then the MUI5 theme provider theme is used*/
80
- theme: PropTypes.object
83
+ theme: PropTypes.object,
84
+
85
+ /** Controls the location of the dropdown popup menu */
86
+ menuAnchorLocation: PropTypes.oneOf(['left', 'center', 'right'])
81
87
  };
@@ -94,5 +94,7 @@ ReusableMenu.propTypes = {
94
94
  * The theme object to apply to this object, if no theme provided then the component will used the default theme passed down by the ThemeProvider
95
95
  */
96
96
  theme: PropTypes.object,
97
+
98
+ /** Controls the location of the dropdown popup menu */
97
99
  menuAnchorLocation: PropTypes.oneOf(['left', 'center', 'right'])
98
100
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.138",
3
+ "version": "0.0.139",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {