|
1 | | -import { Toolbar, Grid, Button, Typography, Box } from "@mui/material"; |
| 1 | +import { Toolbar, Grid, Button, Typography, Box, Tooltip } from "@mui/material"; |
2 | 2 | import { Colors } from "design/theme"; |
3 | 3 | import React from "react"; |
4 | 4 | import { useNavigate, Link } from "react-router-dom"; |
@@ -96,10 +96,57 @@ const NavItems: React.FC = () => { |
96 | 96 | { text: "Wiki", url: "https://neurojson.org/Wiki" }, |
97 | 97 | { text: "Search", url: RoutesEnum.SEARCH }, |
98 | 98 | { text: "Databases", url: RoutesEnum.DATABASES }, |
99 | | - { text: "V1", url: "https://neurojson.io/v1" }, |
100 | | - ].map(({ text, url }) => ( |
| 99 | + { |
| 100 | + text: "V1", |
| 101 | + url: "https://neurojson.io/v1", |
| 102 | + tooltip: "Visit the previous version of website", |
| 103 | + }, |
| 104 | + ].map(({ text, url, tooltip }) => ( |
101 | 105 | <Grid item key={text}> |
102 | | - {url?.startsWith("https") ? ( |
| 106 | + {tooltip ? ( |
| 107 | + <Tooltip |
| 108 | + title={tooltip} |
| 109 | + arrow |
| 110 | + componentsProps={{ |
| 111 | + tooltip: { |
| 112 | + sx: { |
| 113 | + bgcolor: Colors.lightGray, |
| 114 | + color: Colors.darkPurple, |
| 115 | + }, |
| 116 | + }, |
| 117 | + arrow: { |
| 118 | + sx: { |
| 119 | + color: Colors.lightGray, |
| 120 | + }, |
| 121 | + }, |
| 122 | + }} |
| 123 | + > |
| 124 | + <a |
| 125 | + href={url} |
| 126 | + target="_blank" |
| 127 | + rel="noopener noreferrer" |
| 128 | + style={{ textDecoration: "none" }} |
| 129 | + > |
| 130 | + <Typography |
| 131 | + align="center" |
| 132 | + fontWeight={600} |
| 133 | + lineHeight={"1.5rem"} |
| 134 | + letterSpacing={"0.05rem"} |
| 135 | + sx={{ |
| 136 | + color: Colors.white, |
| 137 | + transition: "color 0.3s ease, transform 0.3s ease", |
| 138 | + textTransform: "uppercase", |
| 139 | + "&:hover": { |
| 140 | + transform: "scale(1.2)", |
| 141 | + cursor: "pointer", |
| 142 | + }, |
| 143 | + }} |
| 144 | + > |
| 145 | + {text} |
| 146 | + </Typography> |
| 147 | + </a> |
| 148 | + </Tooltip> |
| 149 | + ) : url?.startsWith("https") ? ( |
103 | 150 | <a |
104 | 151 | href={url} |
105 | 152 | target="_blank" |
|
0 commit comments