IceCubesApp/Packages/DesignSystem/Sources/DesignSystem/Theme.swift

16 lines
656 B
Swift
Raw Normal View History

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() { }
}