mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-10 15:14:27 +00:00
Add modifiers in demo
As several modifiers are now supported on the same `Style` struct, make sure that this feature is illustrated in some places of the demo.
This commit is contained in:
parent
43e38ac483
commit
d83baab433
1 changed files with 4 additions and 2 deletions
|
@ -69,7 +69,7 @@ where
|
|||
Style::default()
|
||||
.fg(Color::Magenta)
|
||||
.bg(Color::Black)
|
||||
.modifier(Modifier::ITALIC),
|
||||
.modifier(Modifier::ITALIC | Modifier::BOLD),
|
||||
)
|
||||
.label(&format!("{} / 100", app.progress))
|
||||
.percent(app.progress)
|
||||
|
@ -229,7 +229,9 @@ where
|
|||
.direction(Direction::Horizontal)
|
||||
.split(area);
|
||||
let up_style = Style::default().fg(Color::Green);
|
||||
let failure_style = Style::default().fg(Color::Red);
|
||||
let failure_style = Style::default()
|
||||
.fg(Color::Red)
|
||||
.modifier(Modifier::RAPID_BLINK | Modifier::CROSSED_OUT);
|
||||
let header = ["Server", "Location", "Status"];
|
||||
let rows = app.servers.iter().map(|s| {
|
||||
let style = if s.status == "Up" {
|
||||
|
|
Loading…
Reference in a new issue