File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 5
5
{{ #if this.showClipboardSuccessIcon }}
6
6
{{ svg-jar " success" width =" 24px" height =" 24px" }}
7
7
{{ else }}
8
- <CopyButton @clipboardText ={{ concat " import " this. item " from '" this. package " ';" }} @title =" Copy to clipboard" @success ={{ action " showSuccess" }} >
8
+ <CopyButton @clipboardText ={{ concat " import " @ item " from '" @ package " ';" }} @title =" Copy to clipboard" @success ={{ this. showSuccess}} >
9
9
{{ svg-jar " copy" width =" 24px" height =" 24px" }}
10
10
</CopyButton >
11
11
{{ /if }}
14
14
<table class =" CodeRay" >
15
15
<tbody >
16
16
<tr >
17
- <td class =" code" ><pre ><span class =" wrapper" ><span class =" keyword" >import</span > {{ item }} <span class =" keyword" >from</span > <span class =" string" >'{{ this. package}} '</span >;</span ></pre ></td >
17
+ <td class =" code" ><pre ><span class =" wrapper" ><span class =" keyword" >import</span > {{ @ item}} <span class =" keyword" >from</span > <span class =" string" >'{{ @ package}} '</span >;</span ></pre ></td >
18
18
</tr >
19
19
</tbody >
20
20
</table >
Original file line number Diff line number Diff line change 1
- /* eslint-disable ember/classic-decorator-no-classic-methods */
2
1
import { action } from '@ember/object' ;
3
- import Component from '@ember /component' ;
2
+ import Component from '@glimmer /component' ;
4
3
import { later } from '@ember/runloop' ;
4
+ import { tracked } from '@glimmer/tracking' ;
5
5
6
6
export default class ImportExample extends Component {
7
+ @tracked showClipboardSuccessIcon = false ;
8
+
7
9
@action
8
10
showSuccess ( ) {
9
- this . toggleProperty ( ' showClipboardSuccessIcon' ) ;
10
- later ( this , ( ) => this . toggleProperty ( ' showClipboardSuccessIcon' ) , 950 ) ;
11
+ this . showClipboardSuccessIcon = true ;
12
+ later ( this , ( ) => ( this . showClipboardSuccessIcon = false ) , 950 ) ;
11
13
}
12
14
}
You can’t perform that action at this time.
0 commit comments