el.xwx.moe/components/ProfilePhoto.tsx

25 lines
750 B
TypeScript
Raw Normal View History

2023-05-27 14:05:07 -05:00
import React from "react";
import ImageWithFallback from "./ImageWithFallback";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faUser } from "@fortawesome/free-solid-svg-icons";
type Props = {
src: string;
className?: string;
};
export default function ProfilePhoto({ src, className }: Props) {
return (
<ImageWithFallback
src={src}
className={`h-10 w-10 shadow rounded-full border-[3px] border-sky-100 ${className}`}
>
<div
2023-05-28 12:22:01 -05:00
className={`bg-sky-500 text-white h-10 w-10 shadow rounded-full border-[3px] border-sky-100 flex items-center justify-center ${className}`}
2023-05-27 14:05:07 -05:00
>
<FontAwesomeIcon icon={faUser} className="w-5 h-5" />
</div>
</ImageWithFallback>
);
}