mirror of https://github.com/usememos/memos
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
526 B
TypeScript
24 lines
526 B
TypeScript
import { cn } from "@/lib/utils";
|
|
|
|
interface Props {
|
|
avatarUrl?: string;
|
|
className?: string;
|
|
}
|
|
|
|
const UserAvatar = (props: Props) => {
|
|
const { avatarUrl, className } = props;
|
|
return (
|
|
<div className={cn(`w-8 h-8 overflow-clip rounded-xl`, className)}>
|
|
<img
|
|
className="w-full h-auto shadow min-w-full min-h-full object-cover opacity-80"
|
|
src={avatarUrl || "/full-logo.webp"}
|
|
decoding="async"
|
|
loading="lazy"
|
|
alt=""
|
|
/>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default UserAvatar;
|