import React from 'react' ; import { Avatar } from '@talamer/react-widgets' ; export interface UserAvatarProps { name ? : string ; username : string ; avatarSrc ? : string ; } const UserAvatar = ( { name , username , avatarSrc } ) => { let alt = `(${ username })` ; if ( name ) { alt = `${ name } ${ alt }` ; } return < Avatar src = { avatarSrc } alt = { alt } title = { alt } / > ; } ; export default UserAvatar ;