Parcourir la source

fix: profile item menu ui dense

GyDi il y a 2 ans
Parent
commit
5f486d0f51

+ 3 - 1
src/components/profile/profile-item.tsx

@@ -280,6 +280,7 @@ const ProfileItem = (props: Props) => {
         anchorPosition={position}
         anchorReference="anchorPosition"
         transitionDuration={225}
+        MenuListProps={{ sx: { py: 0.5 } }}
         onContextMenu={(e) => {
           setAnchorEl(null);
           e.preventDefault();
@@ -289,7 +290,8 @@ const ProfileItem = (props: Props) => {
           <MenuItem
             key={item.label}
             onClick={item.handler}
-            sx={{ minWidth: 133 }}
+            sx={{ minWidth: 120 }}
+            dense
           >
             {t(item.label)}
           </MenuItem>

+ 3 - 1
src/components/profile/profile-more.tsx

@@ -199,6 +199,7 @@ const ProfileMore = (props: Props) => {
         anchorPosition={position}
         anchorReference="anchorPosition"
         transitionDuration={225}
+        MenuListProps={{ sx: { py: 0.5 } }}
         onContextMenu={(e) => {
           setAnchorEl(null);
           e.preventDefault();
@@ -210,7 +211,8 @@ const ProfileMore = (props: Props) => {
             <MenuItem
               key={item.label}
               onClick={item.handler}
-              sx={{ minWidth: 133 }}
+              sx={{ minWidth: 120 }}
+              dense
             >
               {t(item.label)}
             </MenuItem>