Filament Notifications outside Filament

How can I use the Filament Notifications in a livewire v3 jetstream app. Is it possible?
14 Replies
abdullafahem
abdullafahem8mo ago
I installed and I put the @livewire('notifications') in my blade layout and in my Livewire Component I put the Notification::make() ->title('Saved successfully') ->success() ->send(); Inside the method of save for example and when I create a post doesn't show
LeandroFerreira
LeandroFerreira8mo ago
any console errors?
abdullafahem
abdullafahem8mo ago
ReferenceError: notificationComponent is not defined This is the error
LeandroFerreira
LeandroFerreira8mo ago
did you add @livewire('notifications') in the blade layout?
abdullafahem
abdullafahem8mo ago
Yes I added Is it necessary to place it in a certain place? Or maybe is problem of version: "filament/notifications": "^3.0-stable", I have this version
LeandroFerreira
LeandroFerreira8mo ago
it should work in the body tag it is correct
abdullafahem
abdullafahem8mo ago
Yeah It should but I don't know why I found the solution the problem was with the @FilamentStyles @FilamentScripts Thanks for your time! I have a problem with te color of icon it shows only black I don't know why
LeandroFerreira
LeandroFerreira8mo ago
me too. This should work using ->iconColor('success')
abdullafahem
abdullafahem8mo ago
Same doesn't work
kriss
kriss7mo ago
I have the same problem, what was your problem/solution?
abdullafahem
abdullafahem7mo ago
Did you have problem with the notification that not showing or just with icon color? If you have the problem with the notification it self please check are you added the @FilamentStyles and @FilamentScripts and if you have problem with icon color just add this line of code in your layout blade <div class="text-green-600"> @livewire('notifications') </div>
kriss
kriss7mo ago
notification is showing now but I get an error in the console
No description
kriss
kriss7mo ago
Okay, that was fixed when I removed the separate including of alpinejs