Skip to content

Instantly share code, notes, and snippets.

@diegohaz
Last active June 22, 2018 09:07
Show Gist options
  • Save diegohaz/da6a89089b44cb4f6cab4bccb5f17611 to your computer and use it in GitHub Desktop.
Save diegohaz/da6a89089b44cb4f6cab4bccb5f17611 to your computer and use it in GitHub Desktop.
const Avatar = ({ className, style, ...props }) => (
<img
className={`avatar ${className}`}
style={{ borderRadius: "50%", ...style }}
{...props}
/>
);
Avatar.propTypes = {
src: PropTypes.string.isRequired,
alt: PropTypes.string.isRequired,
className: PropTypes.string,
style: PropTypes.object
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment