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.
memos/web/src/components/UserAvatar.tsx

16 lines
424 B
TypeScript

interface Props {
avatarUrl?: string;
className?: string;
}
const UserAvatar = (props: Props) => {
const { avatarUrl, className } = props;
return (
<div className={`${className ?? ""} w-8 h-8 overflow-clip bg-gray-100 dark:bg-zinc-800`}>
<img className="w-full h-auto rounded-full min-w-full min-h-full object-cover" src={avatarUrl || "/logo.png"} alt="" />
</div>
);
};
export default UserAvatar;