Use specified color for non-highlighted text in HighlightedLabel (#3509)

This PR fixes an issue where the specified color for a
`HighlightedLabel` was not respected as the default color for
non-highlighted text.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2023-12-06 10:41:49 -05:00 committed by GitHub
parent 54ea7257ff
commit f833cd7c16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -23,5 +23,9 @@ impl Render for LabelStory {
"Héllo, world!",
vec![0, 1, 3, 8, 9, 13],
))
.child(Story::label("Highlighted with `color`"))
.child(
HighlightedLabel::new("Hello, world!", vec![0, 1, 2, 7, 8, 12]).color(Color::Error),
)
}
}