Made text of bank name, IBAN and BIC smaller as list item was way too height; set line limit for all three parts to 1; showing line with bank name only if bank name is set

This commit is contained in:
dankito 2020-09-01 17:50:24 +02:00
parent c65632f8f4
commit 044ff141a5
1 changed files with 17 additions and 9 deletions

View File

@ -12,25 +12,33 @@ struct RemitteeListItem: View {
HStack { HStack {
Text(remittee.name) Text(remittee.name)
.font(.headline) .bold()
.lineLimit(1)
Spacer()
}
HStack {
Text(remittee.bankName ?? "")
Spacer() Spacer()
} }
.padding(.vertical, 6) .padding(.vertical, 6)
remittee.bankName.map { bankName in
HStack { HStack {
Text(remittee.iban ?? "") Text(bankName)
.font(.footnote)
Text(remittee.bic ?? "") .lineLimit(1)
Spacer() Spacer()
} }
.padding(.bottom, 6)
}
HStack {
Text(remittee.iban ?? "")
Spacer()
Text(remittee.bic ?? "")
}
.font(.footnote)
.lineLimit(1)
.padding(.bottom, 6.0) .padding(.bottom, 6.0)
} }