Added extensions detailForegroundColor() and styleAsDetail()

This commit is contained in:
dankito 2020-07-26 19:41:19 +02:00
parent 0ece2b1bf5
commit 293ab59eb6
3 changed files with 14 additions and 3 deletions

View File

@ -32,6 +32,17 @@ extension View {
}) })
} }
func detailForegroundColor() -> some View {
return self
.foregroundColor(Color.gray)
}
func styleAsDetail() -> some View {
return self
.font(.callout)
.detailForegroundColor()
}
} }

View File

@ -30,7 +30,7 @@ struct AddAccountDialog: View {
} }
else { else {
Text("Select your bank ...") Text("Select your bank ...")
.foregroundColor(.gray) .detailForegroundColor()
.frame(height: 50) .frame(height: 50)
} }
} }
@ -60,7 +60,7 @@ struct AddAccountDialog: View {
.navigationBarHidden(false) .navigationBarHidden(false)
} }
func isRequiredDataEntered() -> Bool { func isRequiredDataEntered() -> Bool {
return bank != nil return bank != nil
&& customerId.isEmpty == false && customerId.isEmpty == false

View File

@ -26,7 +26,7 @@ struct BankInfoListItem: View {
Spacer() Spacer()
} }
.foregroundColor(.gray) .styleAsDetail()
.padding(.top, 6.0) .padding(.top, 6.0)
} }
} }