Skip to content

Commit

Permalink
Added colors for Status enum
Browse files Browse the repository at this point in the history
  • Loading branch information
juniwalk authored Jul 10, 2024
1 parent 78e650e commit 02c119e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Console/Enums/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace JuniWalk\Utils\Console\Enums;

use JuniWalk\Utils\Enums\Color;
use JuniWalk\Utils\Enums\Interfaces\LabeledEnum;
use JuniWalk\Utils\Enums\Traits\Labeled;

Expand All @@ -24,4 +25,16 @@ public function label(): string
{
return $this->name;
}


public function color(): Color
{
return match ($this) {
self::Working => Color::Secondary,
self::Success => Color::Success,
self::Warning => Color::Warning,
self::Error => Color::Danger,
self::Skipped => Color::Warning,
};
}
}

0 comments on commit 02c119e

Please sign in to comment.