From c1011ddb7f8061c5fe242b6eab62a66537ae671b Mon Sep 17 00:00:00 2001 From: same mf who else Date: Sat, 21 Feb 2026 05:19:59 +0200 Subject: [PATCH] test: button_2, button_3 --- tengri/tengri.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tengri/tengri.rs b/tengri/tengri.rs index cb21ece..87951d3 100644 --- a/tengri/tengri.rs +++ b/tengri/tengri.rs @@ -562,12 +562,20 @@ pub fn named_key (token: &str) -> Option { }) } +/// ``` +/// let _ = button_2("", "", true); +/// let _ = button_2("", "", false); +/// ``` pub fn button_2 <'a> (key: impl Content, label: impl Content, editing: bool) -> impl Content { Tui::bold(true, Bsp::e( Tui::fg_bg(Tui::orange(), Tui::g(0), Bsp::e(Tui::fg(Tui::g(0), &"▐"), Bsp::e(key, Tui::fg(Tui::g(96), &"▐")))), When::new(!editing, Tui::fg_bg(Tui::g(255), Tui::g(96), label)))) } +/// ``` +/// let _ = button_3("", "", "", true); +/// let _ = button_3("", "", "", false); +/// ``` pub fn button_3 <'a> ( key: impl Content, label: impl Content, value: impl Content, editing: bool, ) -> impl Content {