mirror of https://github.com/usememos/memos.git
18 lines
454 B
TypeScript
18 lines
454 B
TypeScript
import classNames from "classnames";
|
|
|
|
interface Props {
|
|
avatarUrl?: string;
|
|
className?: string;
|
|
}
|
|
|
|
const UserAvatar = (props: Props) => {
|
|
const { avatarUrl, className } = props;
|
|
return (
|
|
<div className={classNames(`w-8 h-auto overflow-clip rounded-full`, className)}>
|
|
<img className="w-full h-auto rounded-full min-w-full min-h-full object-cover" src={avatarUrl || "/logo.webp"} alt="" />
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default UserAvatar;
|