~tm85/lintuini

ref: dbf508fa97466afc3a2b45ae3460e50c633c9aaa lintuini/examples/empty_container.rs -rw-r--r-- 749 bytes
dbf508fa — core feat(error): thiserror 27 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
extern crate lintuini;
use lintuini::elements::Element;
use lintuini::elements::Container;

use ratatui::style::{Color, Style};
use ratatui::widgets::BorderType;

use crossterm::event;

fn main() -> std::io::Result<()> {
    let fill = Style::default().bg(Color::Blue);
    let bord_style = Style::default().bg(Color::Green).fg(Color::Black);
    let bord_type = BorderType::Double;
    let cont = lintuini::elements::Container::new();

    ratatui::run(|mut terminal| {
        loop {
            terminal.draw(|mut frame| {
                let area = frame.area();
                cont.render(&mut frame, area).unwrap()
            })?;
            if event::read()?.is_key_press() {
                break Ok(());
            }
        }
    })
}