Skip to content

Commit

Permalink
Change coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatekii committed Dec 29, 2022
1 parent d6b8beb commit 22e08eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,15 @@ impl LogLevel {
LogLevel::Debug => "blue",
LogLevel::Info => "green",
LogLevel::Warn => "yellow",
LogLevel::Error => "red",
LogLevel::Error => "text-red-500",
};
let color = format!("color: {color}");

let label = format!(
"{label}{}",
std::iter::repeat(" ")
.take(pad)
.fold(String::new(), |a, b| a + b)
);
html! {<span style={color}>{label}</span>}
html! {<span class={color}>{label}</span>}
}
}

0 comments on commit 22e08eb

Please sign in to comment.