-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ThemeStyle class, update Theming Engine to use it and fix static …
…analysis issues
- Loading branch information
1 parent
07d78c8
commit 9e72e1f
Showing
3 changed files
with
119 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Minicli\Framework\Theme; | ||
|
||
use Minicli\Framework\Theme\Enums\Background; | ||
use Minicli\Framework\Theme\Enums\FontWeight; | ||
use Minicli\Framework\Theme\Enums\Foreground; | ||
|
||
final class ThemeStyle | ||
{ | ||
public function __construct( | ||
public readonly FontWeight|Foreground $foreground, | ||
public readonly ?Background $background = null | ||
) { | ||
} | ||
|
||
public static function make(FontWeight|Foreground $foreground, ?Background $background = null): self | ||
{ | ||
return new self($foreground, $background); | ||
} | ||
} |