@@ -77,17 +77,17 @@ const UnauthenticatedAccountMenu = () => {
7777 return (
7878 < DropdownMenu >
7979 < Link
80- className = "flex items-center h-14 rounded-lg p-2 gap-2 hover:bg-indigo-50"
80+ className = "flex items-center h-14 w-full rounded-lg p-2 gap-2 hover:bg-indigo-50 overflow-hidden "
8181 to = "/login"
8282 state = { { from : location } }
8383 >
84- < div className = "bg-indigo-50 rounded-full h-10 w-10 flex items-center justify-center overflow-hidden border border-white" >
84+ < div className = "bg-indigo-50 rounded-full h-10 w-10 flex items-center justify-center overflow-hidden border border-white shrink-0 " >
8585 < Icon icon = "mdi:user" className = "text-5xl relative top-1 text-neutral-600" />
8686 </ div >
8787
88- < div className = "flex flex-col items-start flex-grow " >
89- < span className = "font-semibold text-sm" > Log in</ span >
90- < span className = "text-xs text-neutral-500" > anonymous</ span >
88+ < div className = "group-data-[collapsed=true]/sidebar:hidden overflow-hidden " >
89+ < div className = "font-semibold text-sm truncate " > Log in</ div >
90+ < div className = "text-xs text-neutral-500 truncate " > anonymous</ div >
9191 </ div >
9292
9393 < DropdownMenuTrigger
@@ -100,7 +100,7 @@ const UnauthenticatedAccountMenu = () => {
100100 variant = "ghost"
101101 size = "square"
102102 data-testid = "unauthenticated-menu-trigger"
103- className = "hover:bg-indigo-100"
103+ className = "shrink-0 ml-auto hover:bg-indigo-100 group-data-[collapsed=true]/sidebar:hidden "
104104 >
105105 < Icon icon = "mdi:dots-vertical" className = "text-lg" />
106106 </ Button >
@@ -153,15 +153,20 @@ const AuthenticatedAccountMenu = ({
153153 < DropdownMenuTrigger asChild >
154154 < Button
155155 variant = "ghost"
156- className = "h-auto gap-2 hover:bg-indigo-50 rounded-lg p-2"
156+ className = "h-auto w-full justify-start gap-2 hover:bg-indigo-50 rounded-lg p-2 overflow-hidden text-left "
157157 data-testid = "authenticated-menu-trigger"
158158 >
159- < Avatar name = { profile ?. name ?. value } className = "h-10 w-10" />
160- < div className = "flex flex-col items-start" >
161- < span className = "font-semibold text-sm" > { profile ?. label ?. value } </ span >
162- < span className = "text-xs text-neutral-500" > { profile ?. role ?. value } </ span >
159+ < Avatar name = { profile ?. name ?. value } className = "h-10 w-10 shrink-0" />
160+
161+ < div className = "group-data-[collapsed=true]/sidebar:hidden overflow-hidden" >
162+ < div className = "font-semibold text-sm truncate" > { profile ?. label ?. value } </ div >
163+ < div className = "text-xs text-neutral-500 truncate" > { profile ?. role ?. value } </ div >
163164 </ div >
164- < Icon icon = "mdi:dots-vertical" className = "text-lg m-2 ml-auto" />
165+
166+ < Icon
167+ icon = "mdi:dots-vertical"
168+ className = "text-lg m-2 ml-auto group-data-[collapsed=true]/sidebar:hidden transition-all"
169+ />
165170 </ Button >
166171 </ DropdownMenuTrigger >
167172
@@ -191,7 +196,7 @@ const AccountMenuSkeleton = () => {
191196 < div className = "flex items-center gap-2 p-2" >
192197 < Skeleton className = "rounded-full h-10 w-10" />
193198
194- < div className = "flex-grow space-y-2" >
199+ < div className = "flex-grow space-y-2 group-data-[collapsed=true]/sidebar:hidden " >
195200 < Skeleton className = "h-4 w-4/5" />
196201 < Skeleton className = "h-2 w-3/5" />
197202 </ div >
0 commit comments