File tree Expand file tree Collapse file tree 4 files changed +22
-8
lines changed Expand file tree Collapse file tree 4 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 1
1
{{ #if @version.yanked }}
2
2
<button
3
3
type =" button"
4
- local-class =" button "
4
+ local-class =" {{ this.localClass }} "
5
5
...attributes
6
6
data-test-version-unyank-button ={{ @version.num }}
7
7
disabled ={{ @version.unyankTask.isRunning }}
16
16
{{ else }}
17
17
<button
18
18
type =" button"
19
- local-class =" button "
19
+ local-class =" {{ this.localClass }} "
20
20
...attributes
21
21
data-test-version-yank-button ={{ @version.num }}
22
22
disabled ={{ @version.yankTask.isRunning }}
Original file line number Diff line number Diff line change 1
- import Component from '@ember /component' ;
1
+ import Component from '@glimmer /component' ;
2
2
3
- export default Component . extend ( {
4
- tagName : '' ,
5
- } ) ;
3
+ export default class YankButton extends Component {
4
+ get tagName ( ) {
5
+ return '' ;
6
+ }
7
+
8
+ get localClass ( ) {
9
+ if ( this . args . tan ) {
10
+ return 'tan-button' ;
11
+ }
12
+
13
+ return 'yellow-button' ;
14
+ }
15
+ }
Original file line number Diff line number Diff line change 1
- .button {
1
+ .yellow- button {
2
2
composes : yellow-button small from '../styles/shared/buttons.module.css' ;
3
+ }
4
+
5
+ .tan-button {
6
+ composes : tan-button small from '../styles/shared/buttons.module.css' ;
3
7
}
Original file line number Diff line number Diff line change 7
7
<h1 data-test-crate-name>{{ this.crate.name }} </h1 >
8
8
<h2 data-test-crate-version>{{ this.currentVersion.num }} </h2 >
9
9
{{ #if this.isOwner }}
10
- <YankButton @version ={{ this.currentVersion }} />
10
+ <YankButton @version ={{ this.currentVersion }} @ tan = {{ true }} />
11
11
{{ /if }}
12
12
</div >
13
13
You can’t perform that action at this time.
0 commit comments