Added initial token/theme styles and theme service.
This commit is contained in:
16
JSMR.UI.Blazor/Services/ThemeService.cs
Normal file
16
JSMR.UI.Blazor/Services/ThemeService.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace JSMR.UI.Blazor.Services;
|
||||
|
||||
public class ThemeService
|
||||
{
|
||||
public AppTheme Current { get; private set; } = AppTheme.Frozen;
|
||||
public event Action? Changed;
|
||||
|
||||
public void Set(AppTheme theme)
|
||||
{
|
||||
if (theme == Current) return;
|
||||
Current = theme;
|
||||
Changed?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public enum AppTheme { Frozen, Warm }
|
||||
Reference in New Issue
Block a user