@@ -5,8 +5,6 @@ import { on } from '@ember/modifier';
55import { fn } from ' @ember/helper' ;
66import { eq , and } from ' ember-truth-helpers' ;
77import CodeBlock from ' ./code-block' ;
8- // @ts-expect-error Could not find a declaration file for module 'ember-code-snippet'.
9- import { getCodeSnippet } from ' ember-code-snippet' ;
108
119interface CodeExampleSignature {
1210 Element: HTMLElement ;
@@ -99,35 +97,33 @@ export default class CodeExample extends Component<CodeExampleSignature> {
9997 >Result</div >
10098 {{/if }}
10199 </nav >
102- {{#if ( and @ glimmerTs ( eq this . activeTab " glimmer-ts " ) ) }}
103- {{#let ( getCodeSnippet @ glimmerTs ) as | snippet | }}
104- <CodeBlock @ language =" gts" @ code ={{snippet.source }} />
105- {{/let }}
100+ {{#if @ glimmerTs }}
101+ {{#if ( eq this . activeTab " glimmer-ts " ) }}
102+ <CodeBlock @ language =" gts" @ fileName ={{@ glimmerTs }} />
103+ {{/if }}
106104 {{/if }}
107- {{#if ( and @ hbs ( eq this . activeTab " hbs " ) ) }}
108- {{#let ( getCodeSnippet @ hbs) as | snippet | }}
109- <CodeBlock @ language =" handlebars" @ code ={{snippet.source }} />
110- {{/let }}
105+ {{#if @ hbs }}
106+ {{#if ( eq this . activeTab " hbs" ) }}
107+ <CodeBlock @ language =" handlebars" @ fileName ={{@ hbs }} />
108+ {{/if }}
111109 {{/if }}
112110 {{#if @ hbs2 }}
113- {{#let ( getCodeSnippet @ hbs2) as | snippet | }}
114- <CodeBlock @ language =" handlebars" @ code ={{snippet.source }} />
115- {{/let }}
111+ <CodeBlock @ language =" handlebars" @ fileName ={{@ hbs2 }} />
116112 {{/if }}
117- {{#if ( and @ js ( eq this . activeTab " js " ) ) }}
118- {{#let ( getCodeSnippet @ js ) as | snippet | }}
119- <CodeBlock @ language =" js" @ code ={{snippet.source }} />
120- {{/let }}
113+ {{#if @ js }}
114+ {{#if ( eq this . activeTab " js " ) }}
115+ <CodeBlock @ language =" js" @ fileName ={{@ js }} />
116+ {{/if }}
121117 {{/if }}
122- {{#if ( and @ scss ( eq this . activeTab " scss " ) ) }}
123- {{#let ( getCodeSnippet @ scss) as | snippet | }}
124- <CodeBlock @ language =" scss" @ code ={{snippet.source }} />
125- {{/let }}
118+ {{#if @ scss }}
119+ {{#if ( eq this . activeTab " scss" ) }}
120+ <CodeBlock @ language =" scss" @ fileName ={{@ scss }} />
121+ {{/if }}
126122 {{/if }}
127- {{#if ( and @ css ( eq this . activeTab " css " ) ) }}
128- {{#let ( getCodeSnippet @ css) as | snippet | }}
129- <CodeBlock @ language =" css" @ code ={{snippet.source }} />
130- {{/let }}
123+ {{#if @ css }}
124+ {{#if ( eq this . activeTab " css" ) }}
125+ <CodeBlock @ language =" css" @ fileName ={{@ css }} />
126+ {{/if }}
131127 {{/if }}
132128 {{#if ( and this . showResult ( has-block ) ) }}
133129 <div
0 commit comments