16 lines
349 B
C#
16 lines
349 B
C#
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 } |