Action in Form

I've copied this code from the docs but am getting a error. I've tried to switch action classes but that doesnt solve it
https://filamentphp.com/docs/3.x/forms/actions#defining-a-form-component-action
\Filament\Forms\Components\Actions\Action::make('resetStars')
                                    ->icon('heroicon-m-x-mark')
                                    ->color('danger')
                                    ->requiresConfirmation()
                                    ->action(function () {

                                    }),

Error:
Filament\Forms\ComponentContainer::Filament\Forms\Concerns\{closure}(): Argument #1 ($component) must be of type Filament\Forms\Components\Component, Filament\Forms\Components\Actions\Action given
Was this page helpful?