index : nmrs-tui
A fast, Vim-friendly NetworkManager TUI built in Rust.
about summary refs log tree commit diff
author y2w8 <yousefalharby416@gmail.com> 2026-01-16 11:21:44 +0300
committer y2w8 <yousefalharby416@gmail.com> 2026-01-17 20:42:32 +0300
commit da5c0a1f5277c353a9019d5b26d71b036790ac6d [patch]
tree 743c63262200334dcf1a34b502d2f66642d66a3c
parent 4c2d53944b0e86a8bd564db1def1775cdd437a16
download da5c0a1f5277c353a9019d5b26d71b036790ac6d.tar.gz

feat(ui): table

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);
}