Extract constants to separate module

This commit is contained in:
Joscha 2022-06-13 23:33:08 +02:00
parent 6e9216913e
commit eba68dc7d7
2 changed files with 31 additions and 8 deletions

View file

@ -0,0 +1,23 @@
use crossterm::style::{ContentStyle, Stylize};
pub const TIME_FORMAT: &str = "%H:%M ";
pub const TIME_WIDTH: usize = 6;
pub fn style_time() -> ContentStyle {
ContentStyle::default().grey()
}
pub fn style_time_inverted() -> ContentStyle {
ContentStyle::default().black().on_white()
}
pub const INDENT: &str = "";
pub const INDENT_WIDTH: usize = 2;
pub fn style_indent() -> ContentStyle {
ContentStyle::default().grey()
}
pub fn style_indent_inverted() -> ContentStyle {
ContentStyle::default().black().on_white()
}