Filament Notifications outside Filament

How can I use the Filament Notifications in a livewire v3 jetstream app. Is it possible?
14 Replies
abdullafahem
abdullafahemOP12mo 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
LeandroFerreira12mo ago
any console errors?
abdullafahem
abdullafahemOP12mo ago
ReferenceError: notificationComponent is not defined This is the error
LeandroFerreira
LeandroFerreira12mo ago
did you add @livewire('notifications') in the blade layout?
abdullafahem
abdullafahemOP12mo 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
LeandroFerreira12mo ago
it should work in the body tag it is correct
abdullafahem
abdullafahemOP12mo 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
LeandroFerreira12mo ago
me too. This should work using ->iconColor('success')
abdullafahem
abdullafahemOP12mo ago
Same doesn't work
kriss
kriss12mo ago
I have the same problem, what was your problem/solution?
abdullafahem
abdullafahemOP12mo 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
kriss12mo ago
notification is showing now but I get an error in the console
No description
kriss
kriss12mo ago
Okay, that was fixed when I removed the separate including of alpinejs
Want results from more Discord servers?
Add your server