2022-12-24 13:55:04 +00:00
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
public class Theme: ObservableObject {
|
|
|
|
enum ThemeKey: String {
|
2022-12-29 09:39:34 +00:00
|
|
|
case colorScheme, tint, label, primaryBackground, secondaryBackground
|
2022-12-24 13:55:04 +00:00
|
|
|
}
|
|
|
|
|
2022-12-29 09:39:34 +00:00
|
|
|
@AppStorage(ThemeKey.colorScheme.rawValue) public var colorScheme: String = "dark"
|
2022-12-24 13:55:04 +00:00
|
|
|
@AppStorage(ThemeKey.tint.rawValue) public var tintColor: Color = .brand
|
|
|
|
@AppStorage(ThemeKey.primaryBackground.rawValue) public var primaryBackgroundColor: Color = .primaryBackground
|
|
|
|
@AppStorage(ThemeKey.secondaryBackground.rawValue) public var secondaryBackgroundColor: Color = .secondaryBackground
|
|
|
|
@AppStorage(ThemeKey.label.rawValue) public var labelColor: Color = .label
|
|
|
|
|
|
|
|
public init() { }
|
|
|
|
}
|