import React from 'react'; import PropTypes from 'prop-types'; import { AvatarIcon } from './Icons'; const Avatar = ({ size, src, alt, className, }) => { const avatar = src ? ( {alt} ) : ( ); return ( {avatar} ); }; Avatar.propTypes = { src: PropTypes.string, size: PropTypes.string, alt: PropTypes.string, className: PropTypes.string, }; Avatar.defaultProps = { src: null, size: '2rem', alt: null, className: null, }; export default Avatar;