[Update Package] Update material UI package which changed the UI code too.
This commit is contained in:
@@ -40,7 +40,7 @@ export class UserAvatarComponent extends Component<IUserAvatarComponentProps,IUs
|
||||
/**
|
||||
* Trigger on touch tap
|
||||
*/
|
||||
onTouchTap: PropTypes.func
|
||||
onClick: PropTypes.func
|
||||
|
||||
}
|
||||
|
||||
@@ -64,13 +64,13 @@ export class UserAvatarComponent extends Component<IUserAvatarComponentProps,IUs
|
||||
* @return {react element} return the DOM which rendered by component
|
||||
*/
|
||||
render () {
|
||||
let { fileName, fullName, style, size, onTouchTap } = this.props
|
||||
let { fileName, fullName, style, size, onClick } = this.props
|
||||
|
||||
return (
|
||||
<div style={{display: 'inherit'}}>
|
||||
{(fileName && fileName !== '' && fileName !== 'noImage' )
|
||||
? ( <Avatar backgroundColor='#ffffff' src={fileName} size={size || 36} style={style} onTouchTap={onTouchTap} />)
|
||||
: (<Avatar backgroundColor='#00bcd4' size={size || 36} style={style} onTouchTap={onTouchTap}>{fullName ? fullName.slice(0, 1) : ''}</Avatar>) }
|
||||
? ( <Avatar src={fileName ? fileName : ' '} style={{...style, backgroundColor: '#ffffff', width: size || 36, height: size || 36}} onClick={onClick} />)
|
||||
: (<Avatar style={{...style, backgroundColor: '#00bcd4', width: size || 36, height: size || 36}} onClick={onClick}>{fullName ? fullName.slice(0, 1) : ''}</Avatar>) }
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user