Skip to content

Commit a9795e9

Browse files
Merge branch 'development'
2 parents a1561a3 + 955d800 commit a9795e9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

addon/components/au-control-checkbox.hbs

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,9 @@
1313
...attributes
1414
/>
1515
<span class="au-c-control__indicator"></span>
16-
{{@label}}
16+
{{#if (has-block)}}
17+
{{yield}}
18+
{{else}}
19+
{{@label}}
20+
{{/if}}
1721
</label>

tests/integration/components/au-control-checkbox-test.js

+10
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ module('Integration | Component | au-control-checkbox', function (hooks) {
1919
assert.dom().hasText('foo');
2020
});
2121

22+
test('it can show block content', async function (assert) {
23+
await render(hbs`<AuControlCheckbox>bar</AuControlCheckbox>`);
24+
assert.dom().hasText('bar');
25+
});
26+
27+
test('it will give preference to show block content against a label', async function (assert) {
28+
await render(hbs`<AuControlCheckbox @label="foo">bar</AuControlCheckbox>`);
29+
assert.dom().hasText('bar');
30+
});
31+
2232
test('it can be disabled', async function (assert) {
2333
this.disabled = true;
2434

0 commit comments

Comments
 (0)