Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 41 42 43 44 45 46 | import { Mail } from "lucide-react";
type ContactItem = {
label: string;
email: string;
description?: string;
};
interface ContactProps {
items: ContactItem[];
}
export default function ContactList({ items }: ContactProps) {
return (
<div className="max-w-4xl p-4 space-y-4">
<div className="grid gap-4 sm:grid-cols-2">
{items.map((item, index) => (
<div
key={index}
className="border rounded-2xl shadow-sm p-4 flex items-start space-x-3 hover:shadow-md transition-shadow bg-white"
>
<div>
<div className="flex flex-row gap-4 items-center">
<div className="flex-shrink-0 mt-1">
<Mail className="w-6 h-6 text-blue-600" />
</div>
<h2 className="font-semibold text-gray-900">{item.label}</h2>
</div>
<a
href={`mailto:${item.email}`}
className="text-blue-600 hover:underline"
>
{item.email}
</a>
{item.description && (
<p className="text-sm text-gray-600 mt-1">{item.description}</p>
)}
</div>
</div>
))}
</div>
</div>
);
}
|