Fix chip text color in dark theme and add towncrier

This commit is contained in:
David Langley
2021-08-25 14:13:04 +01:00
parent 7a4554f53d
commit 9fe53a7957
3 changed files with 12 additions and 3 deletions
@@ -39,7 +39,7 @@ struct Chip: View {
if !isEnabled {
return Color(theme.colors.tertiaryContent)
}
return Color(theme.colors.background)
return Color.white
}
var body: some View {
@@ -65,6 +65,10 @@ struct Chip: View {
@available(iOS 14.0, *)
struct Chip_Previews: PreviewProvider {
static var previews: some View {
Chip(chip: "My great chip", onDelete: { })
Group {
Chip(chip: "My great chip", onDelete: { })
Chip(chip: "My great chip", onDelete: { })
.theme(.dark)
}
}
}
@@ -84,7 +84,11 @@ struct Chips: View {
struct Chips_Previews: PreviewProvider {
static var chips: [String] = ["Chip1", "Chip2", "Chip3", "Chip4", "Chip5", "Chip6"]
static var previews: some View {
Chips(chips: chips, didDeleteChip: { _ in })
Group {
Chips(chips: chips, didDeleteChip: { _ in })
Chips(chips: chips, didDeleteChip: { _ in })
.theme(.dark)
}
}
}