Skip to content

Commit

Permalink
added examples to the showcase
Browse files Browse the repository at this point in the history
  • Loading branch information
zamoore committed Nov 20, 2024
1 parent 29d9bee commit e5e73b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/components/src/components/hds/text/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ export default class HdsText extends Component<HdsTextSignature> {

// add a (helper) class based on the @color argument (if pre-defined)
if (this.predefinedColor) {
console.log('hey');
classes.push(`hds-foreground-${this.predefinedColor}`);
}

Expand Down
2 changes: 2 additions & 0 deletions showcase/app/controllers/components/code-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';

export default class CodeEditorController extends Controller {
demoCode = `console.log('Hello, world!');`;

languages = [
{
value: 'go',
Expand Down
6 changes: 3 additions & 3 deletions showcase/app/templates/components/code-editor.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Hds::CodeEditor />
</SF.Item>
<SF.Item @label="With initial content">
<Hds::CodeEditor @value={{this.demoJavascript}} />
<Hds::CodeEditor @value={{this.demoCode}} />
</SF.Item>
</Shw::Flex>

Expand All @@ -30,7 +30,7 @@
<Hds::CodeEditor @canExpand={{true}} />
</SF.Item>
<SF.Item @label="With copyable content">
<Hds::CodeEditor @canCopy={{true}} @value={{this.demoJavascript}} />
<Hds::CodeEditor @canCopy={{true}} @value={{this.demoCode}} />
</SF.Item>
<SF.Item @label="With custom header content">
<Hds::CodeEditor as |CE|>
Expand All @@ -43,7 +43,7 @@
@description="This is a complex example"
@canCopy={{true}}
@canExpand={{true}}
@value={{this.demoJavascript}}
@value={{this.demoCode}}
as |CE|
>
<CE.ToolbarButton @text="Custom button" />
Expand Down

0 comments on commit e5e73b4

Please sign in to comment.