mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-06 21:12:23 +00:00
15 lines
656 B
Swift
15 lines
656 B
Swift
import SwiftUI
|
|
|
|
public class Theme: ObservableObject {
|
|
enum ThemeKey: String {
|
|
case colorScheme, tint, label, primaryBackground, secondaryBackground
|
|
}
|
|
|
|
@AppStorage(ThemeKey.colorScheme.rawValue) public var colorScheme: String = "dark"
|
|
@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() { }
|
|
}
|