File tree Expand file tree Collapse file tree 2 files changed +6
-30
lines changed
Expand file tree Collapse file tree 2 files changed +6
-30
lines changed Original file line number Diff line number Diff line change 1- <div class =' highlight javascript' >
2- <div class =' ribbon' ></div >
3- {{ #if (is-clipboard-supported )}}
4- <div class =' import-copy' >
5- {{ #if this.showClipboardSuccessIcon }}
6- {{ svg-jar ' success' width =' 24px' height =' 24px' }}
7- {{ else }}
8- <CopyButton @clipboardText ={{ concat ' import ' @item " from '" @package " ';" }} @title =' Copy to clipboard' @success ={{ this.showSuccess }} >
9- {{ svg-jar ' copy' width =' 24px' height =' 24px' }}
10- </CopyButton >
11- {{ /if }}
12- </div >
13- {{ /if }}
14- <table class =' CodeRay' >
15- <tbody >
16- <tr >
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- </tr >
19- </tbody >
20- </table >
21- </div >
1+ <MarkdownToHtml @markdown ={{ this.markdown }} />
Original file line number Diff line number Diff line change 1- import { action } from '@ember/object' ;
21import Component from '@glimmer/component' ;
3- import { later } from '@ember/runloop' ;
4- import { tracked } from '@glimmer/tracking' ;
52
63export default class ImportExample extends Component {
7- @tracked showClipboardSuccessIcon = false ;
8-
9- @action
10- showSuccess ( ) {
11- this . showClipboardSuccessIcon = true ;
12- later ( this , ( ) => ( this . showClipboardSuccessIcon = false ) , 950 ) ;
4+ get markdown ( ) {
5+ let md = `\`\`\`js
6+ import ${ this . args . item } from '${ this . args . package } ';
7+ \`\`\`` ;
8+ return md ;
139 }
1410}
You can’t perform that action at this time.
0 commit comments