ToastMagic v1.0.4 Release Notes — Advanced Customization for Livewire Toasts
✨ What's New
-
Custom Button Support in Livewire Toasts:
You can now include custom buttons in your Livewire-dispatched toasts. Add a link with custom text directly inside the toast notification using theoptions
parameter:$this->dispatch('toastMagic', status: 'success', title: 'User Created', message: 'The user has been successfully created.', options: [ 'showCloseBtn' => true, 'customBtnText' => 'Link Text', 'customBtnLink' => 'https://demo.com', ], );
-
Improved Option Handling:
The toast system now gracefully parses and applies advanced configuration options passed from Livewire, offering more control and flexibility.
🛠️ Enhancements
-
Better UX with Optional Close Button:
Developers can now toggle a close button per toast usingshowCloseBtn
, offering users manual dismissal options. -
Refined Event Handling:
Fine-tuned the waytoastMagic
events are handled to improve reliability and compatibility across Livewire’s lifecycle events.