Added system colors from UIColor

This commit is contained in:
dankito 2020-07-26 19:57:00 +02:00
parent be2b6f201c
commit c8c116e9e4
1 changed files with 18 additions and 1 deletions

View File

@ -34,7 +34,7 @@ extension View {
func detailForegroundColor() -> some View {
return self
.foregroundColor(Color.gray)
.foregroundColor(Color.secondary)
}
func detailFont() -> some View {
@ -51,6 +51,23 @@ extension View {
}
public extension Color {
static let lightText = Color(UIColor.lightText)
static let darkText = Color(UIColor.darkText)
static let label = Color(UIColor.label)
static let secondaryLabel = Color(UIColor.secondaryLabel)
static let tertiaryLabel = Color(UIColor.tertiaryLabel)
static let quaternaryLabel = Color(UIColor.quaternaryLabel)
static let systemBackground = Color(UIColor.systemBackground)
static let secondarySystemBackground = Color(UIColor.secondarySystemBackground)
static let tertiarySystemBackground = Color(UIColor.tertiarySystemBackground)
// There are more..
}
extension Alert.Button {
public static func ok(_ action: (() -> Void)? = {}) -> Alert.Button {