uxterm 1.0.0

A user experience-focused terminal UI library built with Crossterm.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub struct Button {
    pub label: String,
}

impl Button {
    pub fn new(label: &str) -> Self {
        Button {
            label: label.to_string(),
        }
    }

    pub fn render(&self) -> String {
        let width = self.label.len() + 2;
        format!("{}\n{}\n{}", "".repeat(width), self.label, "".repeat(width))
    }
}