-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProfileHeader.tsx
More file actions
40 lines (34 loc) · 1.27 KB
/
ProfileHeader.tsx
File metadata and controls
40 lines (34 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { cn } from "@/lib/utils";
interface ProfileHeaderProps {
imageUrl?: string;
name: string;
title: string;
className?: string;
}
const ProfileHeader = ({ imageUrl, name, title, className }: ProfileHeaderProps) => {
return (
<div className={cn("text-center mb-8", className)}>
<div className="relative mx-auto w-24 h-24 mb-4 overflow-hidden">
{imageUrl ? (
<img
src={imageUrl}
alt={name}
className="w-full h-full object-cover rounded-full border-2 border-tech-red/50 p-0.5 animate-pulse-subtle"
/>
) : (
<div className="w-full h-full rounded-full bg-gradient-to-br from-tech-red to-tech-teal flex items-center justify-center text-white text-2xl font-bold">
{name.charAt(0)}
</div>
)}
<div className="absolute inset-0 rounded-full bg-gradient-to-br from-tech-red to-tech-teal opacity-0 hover:opacity-20 transition-opacity duration-300"></div>
</div>
<h1 className="text-2xl font-display font-bold text-tech-white relative inline-block tech-border pb-2 mb-2">
{name}
</h1>
<p className="text-tech-white/70 text-lg max-w-xs mx-auto">
{title}
</p>
</div>
);
};
export default ProfileHeader;