Impressia/Vernissage/Extensions/Theme+ColorScheme.swift

22 lines
447 B
Swift

//
// https://mczachurski.dev
// Copyright © 2023 Marcin Czachurski and the repository contributors.
// Licensed under the MIT License.
//
import Foundation
import SwiftUI
extension Theme {
public func colorScheme() -> ColorScheme? {
switch self {
case .system:
return nil
case .light:
return ColorScheme.light
case .dark:
return ColorScheme.dark
}
}
}