Skip to content

Commit 4c056e0

Browse files
committed
Conflicts with release 2.4.0 resolved
2 parents 1fc9d87 + d140138 commit 4c056e0

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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

src/Actions/Action.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)