Is there a way to get current step number in Form Wizard?

I have the following piece of code

Wizard::make($steps)
                ->columnSpanFull()
                ->nextAction(function (Action $action): void {
                    $action
                        ->label('Continue');
                });


I want to make it such that I can do something like this (Continue button to be full width if it is the 1st step)

Wizard::make($steps)
                ->columnSpanFull()
                ->nextAction(function (Action $action): void {
                    $action
                        ->label('Continue');
                     // how to get current step number here
                     if ($currentStepNumber === 1) {
                          // w-full doesn't work too
                          $action->extraAttributes(['class' => 'w-full']);
                     }
                });


I tried to inject Component $livewire to the ->nextAction() method but it I got error as it is injecting the parent livewire component, not the form wizard livewire component
Was this page helpful?