fix(sidebar): menyesuaikan untuk badge
This commit is contained in:
parent
50f64186c1
commit
6fbc6e4373
@ -19,10 +19,22 @@ class="bg-zinc-50 dark:bg-zinc-900 border-r rtl:border-r-0 rtl:border-l border-z
|
|||||||
<div class="text-zinc-500 dark:text-gray-300 text-sm/6">{{ $section['heading'] }}</div>
|
<div class="text-zinc-500 dark:text-gray-300 text-sm/6">{{ $section['heading'] }}</div>
|
||||||
<div class="grid gap-2">
|
<div class="grid gap-2">
|
||||||
@foreach ($items as $item)
|
@foreach ($items as $item)
|
||||||
|
@php
|
||||||
|
$hasBadge = isset($item['badge']);
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if ($hasBadge)
|
||||||
|
<flux:navlist.item icon="{{ $item['icon'] }}" href="{{ route($item['route']) }}"
|
||||||
|
:current="request()->routeIs($item['match'])" wire:navigate.hover
|
||||||
|
badge="{{ $item['badge'] }}">
|
||||||
|
{{ $item['label'] }}
|
||||||
|
</flux:navlist.item>
|
||||||
|
@else
|
||||||
<flux:navlist.item icon="{{ $item['icon'] }}" href="{{ route($item['route']) }}"
|
<flux:navlist.item icon="{{ $item['icon'] }}" href="{{ route($item['route']) }}"
|
||||||
:current="request()->routeIs($item['match'])" wire:navigate.hover>
|
:current="request()->routeIs($item['match'])" wire:navigate.hover>
|
||||||
{{ $item['label'] }}
|
{{ $item['label'] }}
|
||||||
</flux:navlist.item>
|
</flux:navlist.item>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user