You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
521 B
22 lines
521 B
import React from "react"; |
|
|
|
function Avatar({ source, size, rounded, status, userImage }) { |
|
return ( |
|
<div className={`${rounded} overflow-hidden relative`}> |
|
<img |
|
src={source ? source : userImage} |
|
alt="avatar" |
|
style={{ width: size, height: size, objectFit: "cover" }} |
|
/> |
|
{status && ( |
|
<span className="w-1.5 h-1.5 rounded-full bg-green-500"></span> |
|
)} |
|
</div> |
|
); |
|
} |
|
|
|
export default Avatar; |
|
|
|
Avatar.defaultProps = { |
|
userImage: "images/blog-author.png", |
|
};
|
|
|