Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
Fix slot bug
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbomanskoug2 committed Apr 28, 2020
1 parent 04bd232 commit cd4c2f2
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/Component/Navbar/navbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,15 @@
</div>

<div class="{{$baseClass}}__list">
@if($slot)
{!! $slot !!}
@else
@foreach ($items as $item)
<a href="{{$item['href']}}" aria-label="{{$item['label']}}">
<div class="{{$baseClass}}__item" item-active="{{isset($item['active']) ? "true" : "false"}}">
<span>{{$item['label']}}</span>
</div>
</a>
@endforeach
@endif
@foreach ($items as $item)
<a href="{{$item['href']}}" aria-label="{{$item['label']}}">
<div class="{{$baseClass}}__item" item-active="{{isset($item['active']) ? "true" : "false"}}">
<span>{{$item['label']}}</span>
</div>
</a>
@endforeach

{!! $slot !!}
</div>

@if ($expanded_menu)
Expand Down

0 comments on commit cd4c2f2

Please sign in to comment.