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 11{{ #if @version.yanked }}
22 <button
33 type =" button"
4- local-class =" button "
4+ local-class =" {{ this.localClass }} "
55 ...attributes
66 data-test-version-unyank-button ={{ @version.num }}
77 disabled ={{ @version.unyankTask.isRunning }}
1616{{ else }}
1717 <button
1818 type =" button"
19- local-class =" button "
19+ local-class =" {{ this.localClass }} "
2020 ...attributes
2121 data-test-version-yank-button ={{ @version.num }}
2222 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' ;
22
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 {
22 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' ;
37}
Original file line number Diff line number Diff line change 77 <h1 data-test-crate-name>{{ this.crate.name }} </h1 >
88 <h2 data-test-crate-version>{{ this.currentVersion.num }} </h2 >
99 {{ #if this.isOwner }}
10- <YankButton @version ={{ this.currentVersion }} />
10+ <YankButton @version ={{ this.currentVersion }} @ tan = {{ true }} />
1111 {{ /if }}
1212 </div >
1313
You can’t perform that action at this time.
0 commit comments