Skip to content

Commit

Permalink
Altered hasBlock in favor for has-block helper (#1468)
Browse files Browse the repository at this point in the history
Co-authored-by: Brian Gantzler <brian.gantzler@cardinalhealth.com>
  • Loading branch information
bgantzler and cah-brian-gantzler authored Apr 3, 2021
1 parent 6aeead2 commit 6c627d8
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion addon/components/bs-form/element.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
size=@size
) as |Control|}}
{{!-- template-lint-enable no-args-paths --}}
{{#if hasBlock}}
{{#if (has-block)}}
{{yield
(hash
value=this.value
Expand Down
6 changes: 3 additions & 3 deletions addon/components/bs-form/element/control/radio.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
title={{@title}}
...attributes
>
{{#if hasBlock}}
{{#if (has-block)}}
{{yield option index}}
{{else}}
{{#if @optionLabelPath}}
Expand Down Expand Up @@ -51,7 +51,7 @@
title={{@title}}
...attributes
>
{{#if hasBlock}}
{{#if (has-block)}}
{{yield option index}}
{{else}}
{{#if @optionLabelPath}}
Expand Down Expand Up @@ -84,7 +84,7 @@
for={{id}}
class="form-check-label"
>
{{#if hasBlock}}
{{#if (has-block)}}
{{yield option index}}
{{else}}
{{#if @optionLabelPath}}
Expand Down
4 changes: 2 additions & 2 deletions addon/components/bs-form/element/label.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#if (macroCondition (macroGetOwnConfig "isBS3"))}}
{{#if hasBlock}}
{{#if (has-block)}}
<label>
{{yield}}
{{@label}}
Expand All @@ -9,7 +9,7 @@
{{/if}}
{{else}}
<label class="{{if this.invisibleLabel "sr-only"}} {{this.labelClass}} {{if this.isHorizontalAndNotCheckbox "col-form-label"}} {{if this.isCheckbox "form-check-label"}} {{this.sizeClass}}" for={{@formElementId}}>
{{#if hasBlock}}
{{#if (has-block)}}
{{yield}}
{{/if}}
{{@label}}
Expand Down
2 changes: 1 addition & 1 deletion addon/components/bs-form/element/legend.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<legend class="{{if this.invisibleLabel "sr-only"}} {{this.labelClass}} {{if this.isHorizontalAndNotCheckbox "col-form-label"}} {{this.sizeClass}}">
{{#if hasBlock}}
{{#if (has-block)}}
{{yield}}
{{/if}}
{{@label}}
Expand Down
2 changes: 1 addition & 1 deletion addon/components/bs-modal/footer.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form class="modal-footer" ...attributes {{on "submit" (bs-default @onSubmit (bs-noop))}}>
{{#if hasBlock}}
{{#if (has-block)}}
{{yield}}
{{else}}
{{#if @submitTitle}}
Expand Down
4 changes: 2 additions & 2 deletions addon/components/bs-modal/header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}}
{{else}}
{{#if (macroCondition (macroGetOwnConfig "isBS4"))}}
{{#if hasBlock}}
{{#if (has-block)}}
{{yield}}
{{else}}
{{#component (bs-default @titleComponent (component "bs-modal/header/title"))}}{{@title}}{{/component}}
Expand All @@ -21,7 +21,7 @@
{{#if (bs-default @closeButton true)}}
{{component (bs-default @closeComponent (component "bs-modal/header/close")) onClick=@onClose}}
{{/if}}
{{#if hasBlock}}
{{#if (has-block)}}
{{yield}}
{{else}}
{{#component (bs-default @titleComponent (component "bs-modal/header/title"))}}{{@title}}{{/component}}
Expand Down
2 changes: 1 addition & 1 deletion addon/components/bs-navbar/toggle.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<button type="button" class="{{if (macroCondition (macroGetOwnConfig "isBS4")) "navbar-toggler" "navbar-toggle"}} {{if this.collapsed "collapsed"}}" ...attributes {{on "click" this.handleClick}}>
{{#if hasBlock}}
{{#if (has-block)}}
{{yield}}
{{else}}
{{#if (macroCondition (macroGetOwnConfig "isBS4"))}}
Expand Down
4 changes: 2 additions & 2 deletions addon/components/bs-progress/bar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
{{style width=this.percentStyleValue}}
>
{{#if this.showLabel}}
{{#if hasBlock}}
{{#if (has-block)}}
{{yield this.percentRounded}}
{{else}}
{{this.percentRounded}}%
{{/if}}
{{else}}
{{#if hasBlock}}
{{#if (has-block)}}
<span class="sr-only">{{yield this.percentRounded}}</span>
{{else}}
<span class="sr-only">{{this.percentRounded}}%</span>
Expand Down
2 changes: 1 addition & 1 deletion addon/components/bs-tooltip.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@class={{@class}}
...attributes
>
{{#if hasBlock}}
{{#if (has-block)}}
{{yield
(hash
close=this.close
Expand Down

0 comments on commit 6c627d8

Please sign in to comment.