Skip to content

Commit ab845cd

Browse files
authored
restyle menu (#1036)
* restyle menu * update readme
1 parent 5cfb734 commit ab845cd

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ The following changes are already implemented:
145145
* 🐋 [Run rootless in Docker container](https://github.com/etkecc/synapse-admin/issues/1021)
146146
* 🇮🇷 [Fix loading of Persian localization](https://github.com/etkecc/synapse-admin/commit/737ec69b16da62e515be12778c46823f6525df4e#diff-26ad4b834941d9b19ebf9db8082bd202aaf72ea0ddea85f5a8a0cb3c729cc6f2)
147147
* 🔖 [Sync page title and document title](https://github.com/etkecc/synapse-admin/pull/1032)
148+
* [Restyle Sidebar Menu](https://github.com/etkecc/synapse-admin/pull/1036)
148149

149150
#### exclusive for [etke.cc](https://etke.cc) customers
150151

src/components/AdminLayout.tsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,29 @@ const AdminMenu = props => {
106106
});
107107

108108
return (
109-
<Menu {...props}>
109+
<Menu
110+
{...props}
111+
sx={theme => ({
112+
"& .RaMenuItemLink-root": {
113+
justifyContent: "center",
114+
padding: "0px 2px 0px 0px",
115+
marginBottom: 0,
116+
},
117+
"& .RaMenuItemLink-icon": {
118+
minWidth: 44,
119+
width: 44,
120+
height: 44,
121+
backgroundColor: "transparent",
122+
display: "flex",
123+
alignItems: "center",
124+
justifyContent: "center",
125+
transition: "box-shadow 150ms ease, transform 150ms ease",
126+
},
127+
"& .RaMenuItemLink-active": {
128+
backgroundColor: theme.palette.mode === "dark" ? "rgba(255, 255, 255, 0.12)" : "rgba(0, 0, 0, 0.06)",
129+
},
130+
})}
131+
>
110132
{etkeRoutesEnabled && !icfg.disabled.monitoring && (
111133
<Menu.Item
112134
key="server_status"

0 commit comments

Comments
 (0)