feat: show drawer collapsed

This commit is contained in:
Rodolfo Ruiz 2025-08-12 17:31:48 -06:00
parent 4ac86a9097
commit 6300421693

View File

@ -122,8 +122,10 @@ export default function MenuDrawer({ zone = 'public', open, onClose, onSelect })
{/* Collapsed */}
{collapsed && (
<Box textAlign="center" p={3} alignItems="center" minHeight={112}>
<Box textAlign="center" p={3} minHeight={112} justifyContent="center" display="flex"
alignItems="start">
<img
style={{ marginTop: 5 }}
src="MiniLogo.png"
alt="Dream Views"
/>
@ -131,7 +133,13 @@ export default function MenuDrawer({ zone = 'public', open, onClose, onSelect })
)}
{/* Items */}
<List sx={{ width: '100%', py: 0 }}>
<List sx={{
width: '100%',
py: 0,
display: 'flex',
flexDirection: 'column',
alignItems: 'stretch'
}}>
{items.map(({ text, icon }, index) => {
// Default items
return (
@ -151,17 +159,17 @@ export default function MenuDrawer({ zone = 'public', open, onClose, onSelect })
}
}}
sx={{
px: collapsed ? 1 : 2,
minHeight: 44,
px: collapsed ? 0 : 2,
minHeight: collapsed ? 48 : 44,
cursor: 'pointer',
justifyContent: collapsed ? 'center' : 'flex-start',
width: collapsed ? 50 : '100%',
width: '100%',
}}
>
<ListItemIcon
sx={{
color: '#40120EFF',
minWidth: 0,
minWidth: collapsed ? 'auto' : 40,
mr: collapsed ? 0 : 1.5,
justifyContent: 'center',
}}
@ -203,7 +211,7 @@ export default function MenuDrawer({ zone = 'public', open, onClose, onSelect })
borderColor: 'transparent'
},
borderRadius: 0,
marginLeft: 1,
marginLeft: 2,
width: 40,
height: 40,
}}>