grep-components 1.15.0-grepf-1792.5 → 1.15.0-grepf-1792.6

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.
@@ -1,7 +1,9 @@
1
1
  export declare type UserMenuItem = {
2
2
  id: string;
3
3
  label: string;
4
- action: () => void;
4
+ action?: () => void;
5
+ isAnchor?: boolean;
6
+ href?: string;
5
7
  };
6
8
  export interface IAuthorizedPage {
7
9
  name: string;
package/dist/index.js CHANGED
@@ -21998,8 +21998,11 @@ var MobileAppBar = function (_a) {
21998
21998
  } }, userMenuItems.map(function (i, index) { return (React.createElement(Box, { key: i.id },
21999
21999
  React.createElement(MenuItem, { key: i.id, onClick: function () {
22000
22000
  handleCloseMenu();
22001
- i.action();
22002
- } }, i.label),
22001
+ i.action && i.action();
22002
+ } }, i.isAnchor ? (React.createElement("a", { style: {
22003
+ textDecoration: 'inherit',
22004
+ color: 'inherit',
22005
+ }, rel: "noreferrer", href: i.href }, i.label)) : (i.label)),
22003
22006
  userMenuItems.length > index + 1 && React.createElement(Divider, null))); }))))));
22004
22007
  };
22005
22008
 
@@ -22043,8 +22046,11 @@ var AppBar = function (_a) {
22043
22046
  return (React.createElement(Box, { key: i.id },
22044
22047
  React.createElement(MenuItem$1, { key: i.id, onClick: function () {
22045
22048
  setUserMenuAnchor(null);
22046
- i.action();
22047
- } }, i.label),
22049
+ i.action && i.action();
22050
+ } }, i.isAnchor ? (React.createElement("a", { style: {
22051
+ textDecoration: 'inherit',
22052
+ color: 'inherit',
22053
+ }, rel: "noreferrer", href: i.href }, i.label)) : (i.label)),
22048
22054
  userMenuItems.length > index + 1 && React.createElement(Divider$1, null)));
22049
22055
  })))),
22050
22056
  React.createElement(ToolbarMenu, null,