Skip to content

Commit 1ded10c

Browse files
committed
add more support for custom nav icon
1 parent d09bbc3 commit 1ded10c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ You can customize the navigation icon by configuring the `navigation-icon` varia
135135
'navigation_icon' => 'heroicon-o-language',
136136
```
137137

138+
Or you can replace the icon with your own custom icon set, by registering a different icon for this icon:
139+
`filament-chained-translation-manager::nav-icon`.
140+
138141
## Usage
139142

140143
The library creates a new directory for the new translations, see [Laravel Chained Translator](https://github.com/statikbe/laravel-chained-translator).

src/Pages/TranslationManagerPage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Filament\Forms\Components\Select;
88
use Filament\Forms\Components\TextInput;
99
use Filament\Pages\Page;
10+
use Filament\Support\Facades\FilamentIcon;
1011
use Illuminate\Support\Collection;
1112
use Illuminate\Support\Facades\Gate;
1213
use Illuminate\Support\Str;
@@ -89,9 +90,8 @@ public static function getNavigationLabel(): string
8990

9091
public static function getNavigationIcon(): ?string
9192
{
92-
return config()->has('filament-translation-manager.navigation_icon')
93-
? config('filament-translation-manager.navigation_icon')
94-
: 'heroicon-o-language';
93+
return FilamentIcon::resolve('filament-chained-translation-manager::nav-icon') ??
94+
config('filament-translation-manager.navigation_icon', 'heroicon-o-language');
9595
}
9696

9797
public function getTitle(): string

0 commit comments

Comments
 (0)