@cullsin/lnc-menu 2.0.2 → 2.0.5
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/dist/src/SideMenu.d.ts +3 -1
- package/dist/src/SideMenu.js +2 -3
- package/package.json +6 -8
package/dist/src/SideMenu.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { NavigateFunction } from "react-router-dom";
|
|
2
3
|
interface SideMenuProps {
|
|
3
4
|
useDrawer: () => {
|
|
4
5
|
isDrawerOpen: boolean;
|
|
5
6
|
toggleDrawer: () => void;
|
|
6
7
|
};
|
|
7
8
|
SampleMgmtIcon: React.ElementType;
|
|
9
|
+
navigate: NavigateFunction;
|
|
8
10
|
}
|
|
9
|
-
declare function SideMenu({ useDrawer, SampleMgmtIcon }: SideMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SideMenu({ useDrawer, SampleMgmtIcon, navigate }: SideMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export default SideMenu;
|
package/dist/src/SideMenu.js
CHANGED
|
@@ -12,10 +12,8 @@ import MenuItem from "@mui/material/MenuItem";
|
|
|
12
12
|
import DashboardOutlinedIcon from "@mui/icons-material/DashboardOutlined";
|
|
13
13
|
import RecentActorsOutlinedIcon from "@mui/icons-material/RecentActorsOutlined";
|
|
14
14
|
import ArticleOutlinedIcon from "@mui/icons-material/ArticleOutlined";
|
|
15
|
-
import { useNavigate } from "react-router-dom";
|
|
16
15
|
import Tooltip from "@mui/material/Tooltip";
|
|
17
|
-
function SideMenu({ useDrawer, SampleMgmtIcon }) {
|
|
18
|
-
const navigate = useNavigate();
|
|
16
|
+
function SideMenu({ useDrawer, SampleMgmtIcon, navigate }) {
|
|
19
17
|
const [selectedMainMenu, setSelectedMainMenu] = React.useState(null); // Track selected main menu
|
|
20
18
|
const { isDrawerOpen, toggleDrawer } = useDrawer();
|
|
21
19
|
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
@@ -31,6 +29,7 @@ function SideMenu({ useDrawer, SampleMgmtIcon }) {
|
|
|
31
29
|
if (isDrawerOpen) {
|
|
32
30
|
toggleDrawer();
|
|
33
31
|
}
|
|
32
|
+
console.log('redirecting', path);
|
|
34
33
|
navigate(path);
|
|
35
34
|
};
|
|
36
35
|
const menuItems = [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cullsin/lnc-menu",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Reusable
|
|
3
|
+
"version": "2.0.5",
|
|
4
|
+
"description": "Reusable SideMenu component for MedGenome LNC platform using MUI and React Router",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -23,18 +23,16 @@
|
|
|
23
23
|
"access": "restricted"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@mui/icons-material": "^5.
|
|
27
|
-
"@mui/material": "^5.
|
|
28
|
-
"react": "^
|
|
29
|
-
"react-dom": "^18.0.0",
|
|
30
|
-
"react-router-dom": "^6.0.0"
|
|
26
|
+
"@mui/icons-material": "^5.14.0",
|
|
27
|
+
"@mui/material": "^5.14.0",
|
|
28
|
+
"react-router-dom": "^7.6.0"
|
|
31
29
|
},
|
|
32
30
|
"devDependencies": {
|
|
33
31
|
"typescript": "^5.0.0"
|
|
34
32
|
},
|
|
35
33
|
"repository": {
|
|
36
34
|
"type": "git",
|
|
37
|
-
"url": "https://github.com/
|
|
35
|
+
"url": "https://github.com/cullsin/lnc-menu"
|
|
38
36
|
},
|
|
39
37
|
"author": "Your Name <you@example.com>"
|
|
40
38
|
}
|