Skip to content

Commit 60c58c7

Browse files
committed
Fix default showCopy value and title
1 parent 8b659bb commit 60c58c7

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

addon/components/docs-snippet/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default Component.extend({
99

1010
language: undefined,
1111
title: undefined,
12-
showCopy: false,
12+
showCopy: true,
1313

1414
_unindent: function(src) {
1515
if (!this.get('unindent')) {

addon/components/docs-snippet/template.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{{#if file}}
2-
<div class='docs-snippet__title'>{{file}}</div>
1+
{{#if title}}
2+
<div class='docs-snippet__title'>{{title}}</div>
33
{{/if}}
44

55
<div class='docs-snippet' data-test-id={{name}}>

tests/dummy/app/pods/docs/components/docs-snippet/template.hbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,7 @@
5151
<p>Be sure to include the file extension.</p>
5252

5353
<p>Code snippets are provided by the `ember-code-snippet` addon and are made available to your app via the `dummy/snippets` importable ES6 module. If you ever want to debug which snippets are getting registered, you can open this module in your devtools (+O, dummy/snippet).</p>
54+
55+
<h2>Customizing Snippets</h2>
56+
57+
<p></p>

0 commit comments

Comments
 (0)