Skip to content

Commit abad52a

Browse files
aymanalhattamigithub-actions[bot]
authored andcommitted
Fix styling
1 parent 34c5b0a commit abad52a

File tree

2 files changed

+18
-21
lines changed

2 files changed

+18
-21
lines changed

src/CopyAction.php

+15-16
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,20 @@ protected function setUp(): void
2121
->color('gray')
2222
->url(url()->current())
2323
->icon('heroicon-o-clipboard-document')
24-
->link()
25-
// ->extraAttributes([
26-
// 'x-data' => '',
27-
// 'x-on:click' => new HtmlString('
28-
// const filamentContextMenuTextToCopy = window.getSelection().toString();
29-
// navigator.clipboard.writeText(filamentContextMenuTextToCopy).then(
30-
// () => {
31-
// console.log("Text copied to clipboard");
32-
// },
33-
// (err) => {
34-
// console.error("Failed to copy text: ", err);
35-
// }
36-
// );
37-
// '),
38-
// ])
39-
;
24+
->link();
25+
// ->extraAttributes([
26+
// 'x-data' => '',
27+
// 'x-on:click' => new HtmlString('
28+
// const filamentContextMenuTextToCopy = window.getSelection().toString();
29+
// navigator.clipboard.writeText(filamentContextMenuTextToCopy).then(
30+
// () => {
31+
// console.log("Text copied to clipboard");
32+
// },
33+
// (err) => {
34+
// console.error("Failed to copy text: ", err);
35+
// }
36+
// );
37+
// '),
38+
// ])
4039
}
4140
}

src/InteractsWithContextMenuActions.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
namespace AymanAlhattami\FilamentContextMenu;
44

5-
use Closure;
65
use Filament\Actions\Action;
7-
use Filament\Actions\ActionGroup;
86
use InvalidArgumentException;
97

108
trait InteractsWithContextMenuActions
@@ -20,11 +18,11 @@ protected function cacheContextMenuActions(): void
2018
{
2119
foreach ($this->getContextMenuActions() as $action) {
2220

23-
if (!$action instanceof Action and !$action instanceof ContextMenuDivider) {
21+
if (! $action instanceof Action and ! $action instanceof ContextMenuDivider) {
2422
throw new InvalidArgumentException('context menu action must be an instance of ' . Action::class . '.');
2523
}
2624

27-
if($action instanceof Action) {
25+
if ($action instanceof Action) {
2826
$this->cacheAction($action);
2927
$this->cachedContextMenuActions[] = $action;
3028
}
@@ -36,7 +34,7 @@ public function getCachedContextMenuActions(): array
3634
return $this->cachedContextMenuActions;
3735
}
3836

39-
public function getContextMenu() : ContextMenu
37+
public function getContextMenu(): ContextMenu
4038
{
4139
return ContextMenu::make()->actions($this->getCachedContextMenuActions());
4240
}

0 commit comments

Comments
 (0)