From 2541e641ce346d9f7ca78e68c90c41c6d68e2b87 Mon Sep 17 00:00:00 2001 From: aymanalhattami Date: Thu, 18 Apr 2024 11:47:30 +0000 Subject: [PATCH] Fix styling --- src/ContentMenu.php | 10 +++++----- src/ContentMenuItem.php | 2 +- src/FilamentContextMenuServiceProvider.php | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ContentMenu.php b/src/ContentMenu.php index a2f6766..c99b495 100644 --- a/src/ContentMenu.php +++ b/src/ContentMenu.php @@ -12,7 +12,7 @@ class ContentMenu private string | null | Closure $title = null; - private Closure|bool $translateTitle = false; + private Closure | bool $translateTitle = false; private array | Closure $items = []; @@ -23,21 +23,21 @@ public static function make(): static public function getTitle(): ?string { - if($this->isTitleTranslatable()) { + if ($this->isTitleTranslatable()) { return __($this->evaluate($this->title)); } return $this->evaluate($this->title); } - public function title(string|Closure $title): static + public function title(string | Closure $title): static { $this->title = $title; return $this; } - public function translateTitle(bool|Closure $translateTitle = true): static + public function translateTitle(bool | Closure $translateTitle = true): static { $this->translateTitle = $translateTitle; @@ -57,7 +57,7 @@ public function getItems(): array /** * @param array $items */ - public function items(array|Closure $items): static + public function items(array | Closure $items): static { $this->items = $items; diff --git a/src/ContentMenuItem.php b/src/ContentMenuItem.php index 43f28f4..27074fe 100644 --- a/src/ContentMenuItem.php +++ b/src/ContentMenuItem.php @@ -54,7 +54,7 @@ public function isTitleTranslatable(): bool return (bool) $this->evaluate($this->translateTitle); } - public function getUrl(): string|Action|null + public function getUrl(): string | Action | null { return $this->evaluate($this->url); } diff --git a/src/FilamentContextMenuServiceProvider.php b/src/FilamentContextMenuServiceProvider.php index 3225ed0..8b28c69 100644 --- a/src/FilamentContextMenuServiceProvider.php +++ b/src/FilamentContextMenuServiceProvider.php @@ -3,7 +3,6 @@ namespace AymanAlhattami\FilamentContextMenu; use Filament\Support\Assets\Css; -use Filament\Support\Assets\Js; use Filament\Support\Facades\FilamentAsset; use Filament\Support\Facades\FilamentView; use Filament\View\PanelsRenderHook;