Stijnus
commited on
Commit
·
f3468d4
1
Parent(s):
23d253e
Update AvatarDropdown.tsx
Browse files
app/components/@settings/core/AvatarDropdown.tsx
CHANGED
@@ -21,52 +21,24 @@ export const AvatarDropdown = ({ onSelectTab }: AvatarDropdownProps) => {
|
|
21 |
return (
|
22 |
<DropdownMenu.Root>
|
23 |
<DropdownMenu.Trigger asChild>
|
24 |
-
<motion.button
|
|
|
|
|
|
|
|
|
25 |
{profile?.avatar ? (
|
26 |
-
<
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
'shadow-sm',
|
34 |
-
)}
|
35 |
-
>
|
36 |
-
<img
|
37 |
-
src={profile.avatar}
|
38 |
-
alt={profile?.username || 'Profile'}
|
39 |
-
className={classNames(
|
40 |
-
'w-full h-full',
|
41 |
-
'object-cover',
|
42 |
-
'transform-gpu',
|
43 |
-
'image-rendering-crisp',
|
44 |
-
'group-hover:brightness-110',
|
45 |
-
'group-hover:scale-105',
|
46 |
-
'transition-all duration-200',
|
47 |
-
)}
|
48 |
-
loading="eager"
|
49 |
-
decoding="sync"
|
50 |
-
/>
|
51 |
-
</div>
|
52 |
) : (
|
53 |
-
<div
|
54 |
-
className={classNames(
|
55 |
-
'w-10 h-10',
|
56 |
-
'rounded-full',
|
57 |
-
'flex items-center justify-center',
|
58 |
-
'bg-white dark:bg-gray-800',
|
59 |
-
'text-gray-400 dark:text-gray-500',
|
60 |
-
'group-hover:text-purple-500 dark:group-hover:text-purple-400',
|
61 |
-
'transition-all duration-200',
|
62 |
-
'shadow-sm',
|
63 |
-
)}
|
64 |
-
>
|
65 |
<div className="i-ph:question w-6 h-6" />
|
66 |
</div>
|
67 |
)}
|
68 |
-
{/* Add subtle circular highlight effect */}
|
69 |
-
<div className="absolute inset-0 rounded-full bg-gradient-to-b from-white/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity" />
|
70 |
</motion.button>
|
71 |
</DropdownMenu.Trigger>
|
72 |
|
|
|
21 |
return (
|
22 |
<DropdownMenu.Root>
|
23 |
<DropdownMenu.Trigger asChild>
|
24 |
+
<motion.button
|
25 |
+
className="w-10 h-10 rounded-full bg-transparent flex items-center justify-center focus:outline-none"
|
26 |
+
whileHover={{ scale: 1.02 }}
|
27 |
+
whileTap={{ scale: 0.98 }}
|
28 |
+
>
|
29 |
{profile?.avatar ? (
|
30 |
+
<img
|
31 |
+
src={profile.avatar}
|
32 |
+
alt={profile?.username || 'Profile'}
|
33 |
+
className="w-full h-full rounded-full object-cover"
|
34 |
+
loading="eager"
|
35 |
+
decoding="sync"
|
36 |
+
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
) : (
|
38 |
+
<div className="w-full h-full rounded-full flex items-center justify-center bg-white dark:bg-gray-800 text-gray-400 dark:text-gray-500">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
<div className="i-ph:question w-6 h-6" />
|
40 |
</div>
|
41 |
)}
|
|
|
|
|
42 |
</motion.button>
|
43 |
</DropdownMenu.Trigger>
|
44 |
|