Skip to content

Commit

Permalink
few minor patches to item
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed Jan 25, 2024
1 parent 336f4c8 commit 8ed7284
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions addon/components/layout/header/dropdown/item.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{#if this.isTextOnly}}
<div class="px-1 flex flex-row {{@item.wrapperClass}}">
<div class={{if @item.overwriteWrapperClass @item.wrapperClass (concat @item.wrapperClass " px-1 flex flex-row")}}>
{{#if @item.icon}}
<FaIcon @icon={{@item.icon}} @size={{or @item.iconSize "sm"}} class="mr-2" />
<FaIcon @icon={{@item.icon}} @size={{or @item.iconSize "sm"}} class={{or @item.iconClass "mr-2"}} />
{{/if}}
<div class="inline-flex flex-col">
<div class="inline-flex flex-col {{@item.inlineClass}}">
{{#if (is-array @item.text)}}
{{#each @item.text as |line|}}
<div class="{{@item.class}}">{{line}}</div>
Expand All @@ -16,32 +16,32 @@
{{/if}}

{{#if this.isLink}}
<div class="px-1 {{@item.wrapperClass}}">
<div class={{if @item.overwriteWrapperClass @item.wrapperClass (concat @item.wrapperClass " px-1")}}>
<LinkTo @route={{@item.route}} disabled={{@item.disabled}} class="next-dd-item {{@item.class}}">
{{#if @item.icon}}
<FaIcon @icon={{@item.icon}} @size={{or @item.iconSize "sm"}} class="mr-2" />
<FaIcon @icon={{@item.icon}} @size={{or @item.iconSize "sm"}} class={{or @item.iconClass "mr-2"}} />
{{/if}}
<span>{{@item.text}}</span>
</LinkTo>
</div>
{{/if}}

{{#if this.isAnchor}}
<div class="px-1 {{@item.wrapperClass}}">
<div class={{if @item.overwriteWrapperClass @item.wrapperClass (concat @item.wrapperClass " px-1")}}>
<a href={{@item.href}} class="next-dd-item {{if @item.disabled 'disabled'}} {{@item.class}}" target={{@item.target}} disabled={{@item.disabled}} {{on "click" (fn @onAction @item.action @item.params)}}>
{{#if @item.icon}}
<FaIcon @icon={{@item.icon}} @size={{or @item.iconSize "sm"}} class="mr-2" />
<FaIcon @icon={{@item.icon}} @size={{or @item.iconSize "sm"}} class={{or @item.iconClass "mr-2"}} />
{{/if}}
<span>{{@item.text}}</span>
</a>
</div>
{{/if}}

{{#if this.isInteractive}}
<div class="px-1 {{@item.wrapperClass}}">
<div class={{if @item.overwriteWrapperClass @item.wrapperClass (concat @item.wrapperClass " px-1")}}>
<a href="javascript:;" class="next-dd-item {{if this.active 'active'}}" disabled={{@item.disabled}} {{on "click" @item.onClick}} ...attributes>
{{#if @item.icon}}
<FaIcon @icon={{@item.icon}} @size={{or @item.iconSize "sm"}} class="mr-2" />
<FaIcon @icon={{@item.icon}} @size={{or @item.iconSize "sm"}} class={{or @item.iconClass "mr-2"}} />
{{/if}}
<span>{{@item.text}}</span>
</a>
Expand Down

0 comments on commit 8ed7284

Please sign in to comment.