Add custom source for avatar picture while conserving default bongo cat picture
This commit is contained in:
parent
505358dfeb
commit
6e3440a5ec
@ -6,7 +6,7 @@ export default function Avatar(props) {
|
||||
return (
|
||||
<img
|
||||
className={styles[props.size]}
|
||||
src="/images/bongo.png"
|
||||
src={props.src}
|
||||
alt="The one and only bongo cat!"
|
||||
/>
|
||||
);
|
||||
@ -14,4 +14,9 @@ export default function Avatar(props) {
|
||||
|
||||
Avatar.propTypes = {
|
||||
size: PropTypes.string.isRequired,
|
||||
src: PropTypes.string
|
||||
};
|
||||
|
||||
Avatar.defaultProps = {
|
||||
src: "/images/bongo.png"
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user