Impressia/Vernissage/Extensions/Theme+ColorScheme.swift

22 lines
450 B
Swift

//
// https://mczachurski.dev
// Copyright © 2023 Marcin Czachurski and the repository contributors.
// Licensed under the Apache License 2.0.
//
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
}
}
}