How to change action view based on arguments?

Is it possible to use tap to apply multiple options or does Filament have another way?
Action::make('test')
    ->tap(function (Action $action) {
        $arguments = $action->getArguments();
        if (isset($arguments['type']) && $arguments['type'] === 'button') {
            $action->grouped()->groupedIcon('heroicon-o-chevron-right');
        } else {
            $action->button()->color('primary');
        }
    })

Arguments is always null
@if ($displayActionButton)
   {{ ($this->testAction)(['type' => 'button']) }}
@else
   {{ $this->testAction }}
@endif
Was this page helpful?