pcm-shared-components 0.0.153 → 0.0.154

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.
@@ -2,9 +2,24 @@ import React, { useState, useEffect } from 'react';
2
2
  import { Tooltip, IconButton, MenuItem, Menu } from "@mui/material";
3
3
  import ChevronRightIcon from '@mui/icons-material/ChevronRight';
4
4
  import { makeStyles } from '@mui/styles';
5
+ import withStyles from "@mui/styles/withStyles";
5
6
  import ListItemIcon from "@mui/material/ListItemIcon";
6
7
  import ListItemText from "@mui/material/ListItemText";
7
8
  import Switch from "@mui/material/Switch";
9
+ const StyledMenuItem = withStyles(() => ({
10
+ root: {
11
+ minHeight: 32,
12
+ paddingLeft: 12,
13
+ paddingRight: 12,
14
+ minWidth: '100% !important',
15
+ "&:focus": {
16
+ backgroundColor: "primary",
17
+ "& .MuiListItemIcon-root, & .MuiListItemText-primary": {
18
+ color: "primary"
19
+ }
20
+ }
21
+ }
22
+ }))(MenuItem);
8
23
 
9
24
  const GenericSubMenu = ({
10
25
  menu,
@@ -73,7 +88,7 @@ const GenericSubMenu = ({
73
88
  return /*#__PURE__*/React.createElement("div", {
74
89
  key: `main_sub_menu_items_${menu.icon}`,
75
90
  className: !full_menu ? "flex flex-row" : 'flex flex-col w-full'
76
- }, full_menu ? /*#__PURE__*/React.createElement(MenuItem, {
91
+ }, full_menu ? /*#__PURE__*/React.createElement(StyledMenuItem, {
77
92
  onClick: openSubMenu
78
93
  }, menu.icon && /*#__PURE__*/React.createElement(ListItemIcon, null, menu.icon), /*#__PURE__*/React.createElement("div", {
79
94
  className: "flex flex-row justify-between w-full"
@@ -114,7 +129,7 @@ const GenericSubMenu = ({
114
129
  classes: classes,
115
130
  full_menu: true,
116
131
  handleParentMenuClose: handleSubMenuClose
117
- }) : /*#__PURE__*/React.createElement(MenuItem, {
132
+ }) : /*#__PURE__*/React.createElement(StyledMenuItem, {
118
133
  key: `sub_menu_items__${idx}}`,
119
134
  onClick: () => {
120
135
  handleSubMenuClose();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.153",
3
+ "version": "0.0.154",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {