Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace App\Filament\Forms\Components;
  3. use Filament\Forms\Components\Wizard;
  4. class LinearWizard extends Wizard
  5. {
  6. protected string $view = 'filament.forms.components.linear-wizard';
  7. protected bool $hideStepTabs = false;
  8. protected ?string $currentStepDescription = null;
  9. /**
  10. * Hide the step tabs at the top of the wizard
  11. */
  12. public function hideStepTabs(bool $condition = true): static
  13. {
  14. $this->hideStepTabs = $condition;
  15. return $this;
  16. }
  17. /**
  18. * Add a description for the current step
  19. */
  20. public function currentStepDescription(?string $description): static
  21. {
  22. $this->currentStepDescription = $description;
  23. return $this;
  24. }
  25. /**
  26. * Get whether the step tabs should be hidden
  27. */
  28. public function areStepTabsHidden(): bool
  29. {
  30. return $this->hideStepTabs;
  31. }
  32. /**
  33. * Get the description for the current step
  34. */
  35. public function getCurrentStepDescription(): ?string
  36. {
  37. return $this->currentStepDescription;
  38. }
  39. }