2021-11-28 14:37:55 +00:00
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
extension Color {
|
|
|
|
#if os(macOS)
|
|
|
|
static let background = Color(NSColor.windowBackgroundColor)
|
2021-12-19 23:36:12 +00:00
|
|
|
static let secondaryBackground = Color(NSColor.controlBackgroundColor)
|
2021-11-28 14:37:55 +00:00
|
|
|
#elseif os(iOS)
|
|
|
|
static let background = Color(UIColor.systemBackground)
|
|
|
|
static let secondaryBackground = Color(UIColor.secondarySystemBackground)
|
|
|
|
#else
|
2021-12-05 17:09:25 +00:00
|
|
|
static func background(scheme: ColorScheme) -> Color {
|
|
|
|
scheme == .dark ? .black : .init(white: 0.8)
|
|
|
|
}
|
2021-11-28 14:37:55 +00:00
|
|
|
#endif
|
|
|
|
}
|