Skip to content

Commit

Permalink
fix: address the ember-component-is-visible deperecation (3.15) (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottkidder authored and knownasilya committed Dec 20, 2019
1 parent 5388e60 commit c1ad3ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions addon/components/x-toggle-label/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export default Component.extend({
classNames: ['toggle-text', 'toggle-prefix'],
classNameBindings: ['labelType'],
for: readOnly('switchId'),
isVisible: readOnly('show'),


labelType: computed('type', function() {
let type = this.get('type');

Expand Down
10 changes: 6 additions & 4 deletions addon/components/x-toggle-label/template.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{#if hasBlock}}
{{yield this.label}}
{{else}}
{{this.label}}
{{#if this.show}}
{{#if hasBlock}}
{{yield this.label}}
{{else}}
{{this.label}}
{{/if}}
{{/if}}

0 comments on commit c1ad3ba

Please sign in to comment.