File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
1
<img
2
2
src ={{ this.src }}
3
- width ={{ this.width }}
4
- height ={{ this.height }}
3
+ width ={{ this.size }}
4
+ height ={{ this.size }}
5
5
alt ={{ this.alt }}
6
6
title ={{ this.title }}
7
7
...attributes
Original file line number Diff line number Diff line change 1
- import { readOnly } from '@ember/object/computed' ;
2
1
import Component from '@glimmer/component' ;
3
2
4
3
export default class UserAvatar extends Component {
5
- get width ( ) {
4
+ get size ( ) {
6
5
if ( this . args . size === 'medium' ) {
7
6
return 85 ;
8
7
} else if ( this . args . size === 'medium-small' ) {
@@ -12,8 +11,6 @@ export default class UserAvatar extends Component {
12
11
}
13
12
}
14
13
15
- @readOnly ( 'width' ) height ;
16
-
17
14
get alt ( ) {
18
15
return this . args . user . name !== null
19
16
? `${ this . args . user . name } (${ this . args . user . login } )`
@@ -34,6 +31,6 @@ export default class UserAvatar extends Component {
34
31
}
35
32
36
33
get src ( ) {
37
- return `${ this . args . user . avatar } &s=${ this . width * 2 } ` ;
34
+ return `${ this . args . user . avatar } &s=${ this . size * 2 } ` ;
38
35
}
39
36
}
You can’t perform that action at this time.
0 commit comments