Custom Infolist Entry Action

Im trying to add an Action to a custom Infolist Entry Component but im hitting a wall with this error...

This is the code inside the Infolist Component reffering to the action:
use Filament\Infolists\Components\Actions\Action;

public function getItemAction($record): Action
    {
        return Action::make('viewActivity')
            ->iconButton()
            ->icon('heroicon-o-eye')
            ->modalHeading('View Action')
            ->modalDescription('View the activity details.')
            ->slideOver()
            ->modalWidth('xl')
            ->modalContent(fn() => view('filament.pages.view-activity', ['activity' => $record]));
    }


Thanks in advance, any info to at least understand what's happening its welcome XD
Was this page helpful?