Compare commits

..

No commits in common. "175b4f993d4deda47dba91df91d83e4d168a5dff" and "d50aeab21dabbf20302c4b088fac69f2f7658712" have entirely different histories.

1 changed files with 5 additions and 43 deletions

View File

@ -30,51 +30,13 @@ const MenuItem = ({ item, onSelectItem }) => {
return ( return (
<> <>
<ListItem <ListItem component="div" onClick={handleToggle}>
component="div"
onClick={hasChildren ? handleToggle : handleOpenTab}
sx={{
cursor: "pointer", // Курсор pointer везде
"&:hover": {
backgroundColor: "#f5f5f5", // Подсветка при наведении на весь элемент
},
}}
>
<ListItemIcon> <ListItemIcon>
{hasChildren ? ( <div onClick={handleOpenTab} style={{ cursor: "pointer" }}>
<div {hasChildren ? (isOpen ? <FolderOpen /> : <Folder />) : <Folder />}
onClick={handleOpenTab} </div>
style={{
cursor: "pointer",
borderRadius: "4px", // Скругление углов
padding: "4px", // Отступы для увеличения области hover
"&:hover": {
backgroundColor: "#e0e0e0", // Подсветка при наведении на иконку
},
}}
>
{isOpen ? <FolderOpen /> : <Folder />}
</div>
) : (
<div
onClick={handleOpenTab}
style={{
cursor: "pointer",
borderRadius: "4px", // Скругление углов
padding: "4px", // Отступы для увеличения области hover
"&:hover": {
backgroundColor: "#e0e0e0", // Подсветка при наведении на иконку
},
}}
>
{/* Здесь можно добавить другую иконку или оставить пустым */}
</div>
)}
</ListItemIcon> </ListItemIcon>
<ListItemText <ListItemText primary={item.title} />
primary={item.title}
sx={{ cursor: "pointer" }} // Курсор pointer для текста
/>
{hasChildren && (isOpen ? <ExpandLess /> : <ExpandMore />)} {hasChildren && (isOpen ? <ExpandLess /> : <ExpandMore />)}
</ListItem> </ListItem>
{hasChildren && ( {hasChildren && (