Skip to content

Commit cb3ec14

Browse files
committed
Custom label
1 parent f5e80b8 commit cb3ec14

File tree

4 files changed

+338
-999
lines changed

4 files changed

+338
-999
lines changed

packages/ember-input/addon/components/tpk-checkbox.hbs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@
3838
@classless={{@classless}}
3939
@guid={{this.guid}}
4040
@label={{@label}}
41-
/>
41+
>
42+
<:label>
43+
{{#if (has-block "label")}}
44+
{{yield @label to="label"}}
45+
{{else}}
46+
{{@label}}
47+
{{/if}}
48+
</:label>
49+
</TpkCheckbox::Label>
4250
{{/if}}
43-
</div>
51+
</div>

packages/ember-input/addon/components/tpk-checkbox/label.hbs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
...attributes
55
data-test-tpk-checkbox-label
66
>
7-
{{yield @label}}
7+
{{#if (has-block "label")}}
8+
{{yield @label to="label"}}
9+
{{else}}
10+
{{@label}}
11+
{{/if}}
812
</label>

packages/ember-input/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@triptyk/ember-input",
3-
"version": "0.0.22",
3+
"version": "0.0.23",
44
"description": "This addon will give you an input in TailwindCSS with Ember",
55
"keywords": [
66
"ember-addon",

0 commit comments

Comments
 (0)