my-website-v2/frontend/components/PhotoCircle.tsx

30 lines
563 B
TypeScript
Raw Normal View History

2024-12-02 17:29:45 -06:00
export const PhotoCircle = function PhotoCircle({
src,
alt,
size = "w-48 h-48",
width = "256",
height = "256",
}: PhotoCircleOpts) {
return (
<div
className={`${size} rounded-full border-4 border-white shadow-md overflow-hidden`}
>
<img
src={src}
alt={alt ?? "A photo in circle"}
width={width}
height={height}
className="w-full h-full object-cover"
/>
</div>
);
};
type PhotoCircleOpts = {
src: string;
alt?: string;
size?: string;
width?: string;
height?: string;
};