filament icon indicating copy to clipboard operation
filament copied to clipboard

Database Notifications - Customizable "Mark All as Read" Action

Open leandrocfe opened this issue 5 months ago • 1 comments

Description

This feature introduces the databaseNotificationsMarkAllAsReadAction() method, which allows passing a closure that returns a custom action. It enables full customization of the Mark All as Read button using the same methods available for customizing trigger buttons.

public function panel(Panel $panel): Panel
{
    return $panel
        ...
        ->databaseNotifications()
        ->databaseNotificationsMarkAllAsReadAction(fn (Action $action) => $action
            ->button()
            ->outlined()
            ->size('sm')
            ->color('success')
        )
...

Visual changes

image

Functional changes

  • [x] Code style has been fixed by running the composer cs command.
  • [x] Changes have been tested to not break existing functionality.
  • [x] Documentation is up-to-date.

leandrocfe avatar Sep 05 '24 15:09 leandrocfe