add hover option on nav link for livewire navigate

This commit is contained in:
samy
2025-09-05 10:54:39 -10:00
parent ac4da06d91
commit 60abed0778
2 changed files with 17 additions and 4 deletions
Generated
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
@@ -1,13 +1,20 @@
@props([ @props([
'label' => '', 'label' => '',
'link' => null, 'link' => null,
'useNavigate' => true 'useNavigate' => true,
'hover' => false,
]) ])
<li> <li>
<a <a
class="whitespace-nowrap" class="whitespace-nowrap"
@if($link) href="{{ $link }}" @endif @if($link) href="{{ $link }}" @endif
@if($useNavigate) wire:navigate @endif @if($useNavigate)
@if($hover)
wire:navigate.hover
@else
wire:navigate
@endif
@endif
>{{ $label }}</a> >{{ $label }}</a>
</li> </li>