Fix subheading styles for budget and category lists

Signed-off-by: Billy Brawner <billy@wbrawner.com>
This commit is contained in:
Billy Brawner 2019-10-10 19:44:20 -07:00
parent 3da85c51c3
commit ac14d9d5fd
2 changed files with 12 additions and 6 deletions

View file

@ -54,10 +54,12 @@ struct BudgetListItemView: View {
VStack(alignment: .leading) {
Text(verbatim: budget.name)
.lineLimit(1)
Text(verbatim: budget.description ?? "")
if budget.description?.isEmpty == false {
Text(verbatim: budget.description!)
.font(.subheadline)
.lineLimit(1)
.foregroundColor(.secondary)
.lineLimit(1)
}
}
}
}

View file

@ -50,8 +50,12 @@ struct CategoryListItemView: View {
) {
VStack(alignment: .leading) {
Text(verbatim: category.title)
Text(verbatim: category.description ?? "")
.foregroundColor(.gray)
if category.description?.isEmpty == false {
Text(verbatim: category.description!)
.font(.subheadline)
.foregroundColor(.secondary)
.lineLimit(1)
}
}
}
}