File size: 530 Bytes
f332108 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
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; |