index : nmrs-tui
A fast, Vim-friendly NetworkManager TUI built in Rust.
about summary refs log tree commit diff

Diffstat

-rw-r--r-- src/ui/mod.rs 1
-rw-r--r-- src/ui/table.rs 13
 2 files changed, 14 insertions(+)

diff --git a/src/ui/mod.rs b/src/ui/mod.rs
new file mode 100644
index 0000000..13971b0 100644
--- /dev/null
+++ b/src/ui/mod.rs
@@ -1,0 +1,1 @@
pub mod table;
diff --git a/src/ui/table.rs b/src/ui/table.rs
new file mode 100644
index 0000000..731c786 100644
--- /dev/null
+++ b/src/ui/table.rs
@@ -1,0 +1,13 @@
use ratatui::{Frame, layout::{Constraint, Rect}, style::Style, widgets::{Block, Table, Row}};

use crate::app::App;

pub fn draw(f: &mut Frame, area: Rect, app: &mut App) {
    let rows = vec![
        Row::new(vec!["Enter", "blabla"])
    ];
    let table = Table::new(rows, &[Constraint::Percentage(100)])
        .block(Block::bordered().title_top("Networks"))
        .row_highlight_style(Style::new().on_blue().black());
    f.render_widget(table, area);
}