2021-11-28 20:07:55 +05:30
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
extension Color {
|
|
|
|
#if os(macOS)
|
|
|
|
static let background = Color(NSColor.windowBackgroundColor)
|
2021-12-20 05:06:12 +05:30
|
|
|
static let secondaryBackground = Color(NSColor.controlBackgroundColor)
|
2021-11-28 20:07:55 +05:30
|
|
|
#elseif os(iOS)
|
|
|
|
static let background = Color(UIColor.systemBackground)
|
|
|
|
static let secondaryBackground = Color(UIColor.secondarySystemBackground)
|
|
|
|
#else
|
2021-12-05 22:39:25 +05:30
|
|
|
static func background(scheme: ColorScheme) -> Color {
|
|
|
|
scheme == .dark ? .black : .init(white: 0.8)
|
|
|
|
}
|
2021-11-28 20:07:55 +05:30
|
|
|
#endif
|
|
|
|
}
|