Skip to content

Commit

Permalink
Merge pull request #20 from dissto/add-actions-to-entry
Browse files Browse the repository at this point in the history
Add the actions to the alert entry
  • Loading branch information
CodeWithDennis authored Oct 10, 2024
2 parents 63ab6d6 + 769299d commit ae35b98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/views/components/simple-alert-entry.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:link="$getLink()"
:link-label="$getLinkLabel()"
:link-blank="$getLinkBlank()"
:actions="$getActions()"
:border="$getBorder()"
/>
</x-dynamic-component>
8 changes: 8 additions & 0 deletions src/Components/Infolists/SimpleAlert.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace CodeWithDennis\SimpleAlert\Components\Infolists;

use Closure;
use CodeWithDennis\SimpleAlert\Components\Concerns\HasColor;
use CodeWithDennis\SimpleAlert\Components\Concerns\HasDescription;
use CodeWithDennis\SimpleAlert\Components\Concerns\HasIcon;
Expand All @@ -21,6 +22,13 @@ class SimpleAlert extends Entry

protected string $view = 'filament-simple-alert::components.simple-alert-entry';

public function actions(array|Closure $actions): static
{
$this->actions = $actions;

return $this;
}

protected function setUp(): void
{
parent::setUp();
Expand Down

0 comments on commit ae35b98

Please sign in to comment.