IceCubesApp/Packages/DesignSystem/Sources/DesignSystem/Theme.swift
2022-12-29 10:39:34 +01:00

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