use crossterm::style::{Attribute, Color}; use karsa::renderloop::run; use karsa::style::{Halign, Style}; use karsa::widgets::{text::Text, widgetbox::WidgetBox}; use std::io; fn main() -> io::Result<()> { let style = Style::builder() .with_halign(Halign::Center) .with_fg_color(Color::Red) .with_effect(Attribute::Bold) .build(); let text = Text::builder() .with_content("0123456789\nabcdef\nazerty".to_string()) .with_style(style) .build(); let widgetbox = WidgetBox::new(text, 18, 7, Some("Title".to_string())); run(widgetbox, None)?; Ok(()) }