23 lines
470 B
Swift
23 lines
470 B
Swift
|
//
|
||
|
// https://mczachurski.dev
|
||
|
// Copyright © 2023 Marcin Czachurski and the repository contributors.
|
||
|
// Licensed under the MIT License.
|
||
|
//
|
||
|
|
||
|
import SwiftUI
|
||
|
|
||
|
public enum Theme: Int {
|
||
|
case system, light, dark
|
||
|
|
||
|
public func colorScheme() -> ColorScheme? {
|
||
|
switch self {
|
||
|
case .system:
|
||
|
return nil
|
||
|
case .light:
|
||
|
return ColorScheme.light
|
||
|
case .dark:
|
||
|
return ColorScheme.dark
|
||
|
}
|
||
|
}
|
||
|
}
|