peer-at-code-web/ui/Badge.tsx
Nicolas VINCENT bc5eb76e15 badge-home-page
Création de la page des badges et aussi d'un composant badge
2023-02-13 15:41:28 +01:00

10 lines
No EOL
486 B
TypeScript

export default function Badge({ title, path, alt, type }: { title: string; path: string; alt: string; type: string }) {
return (
<div className='text-center md:w-[9%] sm:w-[15%] w-[20%] pr-3 mt-3'>
<img src={path} alt={alt} className={`f-full w-full rounded-full border-2 lg:border-4 ${type === "hard" ? 'border-red-600' : type === 'easy' ? 'border-green-600' : 'border-yellow-600'} `} />
<h2 className='pt-2'>{title}</h2>
</div>
);
}