mirror of
https://github.com/pacnpal/thrillwiki_laravel.git
synced 2025-12-20 08:11:10 -05:00
25 lines
446 B
PHP
25 lines
446 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
enum ThemePreference: string
|
|
{
|
|
case LIGHT = 'light';
|
|
case DARK = 'dark';
|
|
|
|
public function label(): string
|
|
{
|
|
return match($this) {
|
|
self::LIGHT => 'Light',
|
|
self::DARK => 'Dark',
|
|
};
|
|
}
|
|
|
|
public function cssClass(): string
|
|
{
|
|
return match($this) {
|
|
self::LIGHT => 'theme-light',
|
|
self::DARK => 'theme-dark',
|
|
};
|
|
}
|
|
} |