memos/web/src/components/UserAvatar.tsx
Xudong Cai 8eed9c267c
fix: logo img rounded (#1427)
rounded-full move to img tag
2023-03-30 22:21:29 +08:00

15 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;