ashwinR's picture
Upload 75 files
f332108
raw
history blame contribute delete
530 Bytes
import React from "react";
import PropTypes from "prop-types";
import avatarImage from "../assets/avatar-image.png";
import "../styles/avatar.css";
const Avatar = ({page}) => {
const avatarClass = `avatar ${page}`;
const spanClass = `shadow-overlay-${page}`;
return (
<>
<span className={spanClass}></span>
<img src = {avatarImage} className = {avatarClass} alt = "avatar" />
</>
);
};
Avatar.propTypes = {
page: PropTypes.string.isRequired,
};
export default Avatar;