File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed
resources/views/components Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 1+ {{-- This renderIf method is implemented in every action --}}
2+ @php
3+ $class = ' flex hover:text-blue-600 transition-all duration-300 ease-in-out focus:text-blue-600 active:text-blue-600"'
4+ @endphp
5+ @if ($action -> renderIf ($item ) )
6+
7+ <div x-data =" { tooltip: false }" class =" cursor-pointer relative z-30 inline-flex"
8+ @mousemove .away =" tooltip = false"
9+ >
10+ <button
11+ @mousemove =" setInterval(function(){tooltip = false}, 2000); tooltip = true"
12+ @mouseleave =" tooltip = false"
13+ wire:click.prevent =" executeAction('{{ $action -> id } } ', '{{ $item -> getKey () } } ', true)"
14+ class =" {{ $class } }" >
15+ {{ $slot } }
16+ </button >
17+ <div class =" relative" x-cloak x-show.transition.origin.top =" tooltip"
18+ @mousemove =" tooltip = false"
19+ >
20+ <div
21+ @mousemove =" tooltip = false"
22+ class =" flex justify-center absolute top-0 z-30 w-32 p-2 -mt-3 text-sm leading-tight text-white transform -translate-x-1/2 -translate-y-full bg-gray-400 rounded-md shadow-md" >
23+ {{ $action -> title } }
24+ </div >
25+ <svg class =" absolute z-30 w-6 h-6 text-gray-400 transform -translate-x-8 -translate-y-5 fill-current stroke-current"
26+ width =" 8" height =" 8" >
27+ <rect x =" 12" y =" -10" width =" 8" height =" 8" transform =" rotate(45)" />
28+ </svg >
29+ </div >
30+ </div >
31+
32+ @endif
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ abstract class Action
1212
1313 /** @var String $title Title of the action */
1414 public $ title ;
15-
15+
1616 /** @var String $icon Feather icon name*/
1717 public $ icon ;
1818
You can’t perform that action at this time.
0 commit comments