Skip to content

Commit

Permalink
now can render custom icon component from menuItem from universe regi…
Browse files Browse the repository at this point in the history
…stry
  • Loading branch information
roncodes committed Apr 11, 2024
1 parent 700a229 commit 84c1a90
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions addon/components/layout/header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
{{#each @menuItems as |menuItem|}}
<LinkToExternal @route={{menuItem.route}} id={{concat (dasherize menuItem.route) "-header-button"}} class="next-view-header-item truncate {{menuItem.class}}" role="menuitem">
<div class="w-6">
<FaIcon @icon={{menuItem.icon}} @size="sm" />
{{#if menuItem.iconComponent}}
{{component menuItem.iconComponent options=menuItem.iconComponentOptions}}
{{else}}
<FaIcon @icon={{menuItem.icon}} @prefix={{menuItem.iconPrefix}} @size="sm" />
{{/if}}
</div>
<div>
<span>{{menuItem.title}}</span>
Expand All @@ -20,17 +24,18 @@
{{/each}}
</div>
{{/unless}}
<div id="view-header-left-content-a">
</div>
<div id="view-header-left-content-a"></div>
{{yield}}
<div id="view-header-left-content-b"></div>
</div>
<div class="next-view-header-right">
<Layout::Header::LoadingIndicator />
<div id="view-header-actions"></div>
<div class="flex items-center justify-between">
<div class="flex-1 flex items-center pr-1">
<div class="flex-1 flex items-center pr-1 space-x-1">
<LocaleSelectorTray />
<NotificationTray @registerAPI={{@registerNotificationTrayApi}} @onClickNotification={{@onClickNotification}} />
<ChatTray />
</div>
<div class="flex-1 flex items-center pr-1">
<Layout::Header::Dropdown @items={{this.organizationNavigationItems}} @onAction={{@onAction}} class="flex-shrink-0" @triggerClass="flex-shrink-0" as |dd|>
Expand Down

0 comments on commit 84c1a90

Please sign in to comment.