Skip to content

Commit 3e9ee61

Browse files
feat: create go forward action
1 parent 6b3c16b commit 3e9ee61

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/GoForwardAction.php

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
namespace AymanAlhattami\FilamentContextMenu;
4+
5+
use Filament\Actions\Action;
6+
7+
class GoForwardAction extends Action
8+
{
9+
public static function getDefaultName(): ?string
10+
{
11+
return 'go forward';
12+
}
13+
14+
protected function setUp(): void
15+
{
16+
parent::setUp();
17+
18+
$this->label('Go forward')
19+
->translateLabel()
20+
->color('gray')
21+
->icon('heroicon-o-arrow-right')
22+
->link()
23+
->extraAttributes([
24+
'x-data' => '',
25+
'x-on:click' => 'window.history.forward()',
26+
]);
27+
}
28+
}

0 commit comments

Comments
 (0)