use rich_rs::{Console, ConsoleOptions, JustifyMethod, Style, Text};
fn main() {
let options = ConsoleOptions {
max_width: 20,
..ConsoleOptions::from_terminal()
};
let mut console = Console::with_options(options);
let style = Style::parse("bold white on blue").unwrap_or_default();
let text = Text::styled("Rich", style);
console.print(&text, None, None, None, false, "\n").unwrap();
let text = Text::styled("Rich", style);
console
.print(&text, None, Some(JustifyMethod::Left), None, false, "\n")
.unwrap();
let text = Text::styled("Rich", style);
console
.print(&text, None, Some(JustifyMethod::Center), None, false, "\n")
.unwrap();
let text = Text::styled("Rich", style);
console
.print(&text, None, Some(JustifyMethod::Right), None, false, "\n")
.unwrap();
}