diff --git a/examples/auth.rs b/examples/auth.rs new file mode 100644 index 0000000..61b70db --- /dev/null +++ b/examples/auth.rs @@ -0,0 +1,32 @@ +use std::sync::Arc; + +use osui::prelude::*; + +fn main() -> std::io::Result<()> { + let screen = Screen::new(); + + app(screen.clone()).draw(&screen); + + screen.run() +} + +pub fn app(_screen: Arc) -> Rsx { + rsx! { + FlexRow, gap: 1, { + @Style { foreground: Some(0xffffff), background: Background::Solid(0x00ff00) }; + FlexRow { + @Transform::new().padding(1, 1).dimensions(40, 1); + @Style { foreground: Some(0xffffff), background: Background::RoundedOutline(0xff0000) }; + @Focused; + Input { } + } + + // @Style { foreground: Some(0xffffff), background: Background::Solid(0x00ff00) }; + // FlexRow { + // @Transform::new().padding(1, 1).dimensions(40, 1); + // @Style { foreground: Some(0xffffff), background: Background::RoundedOutline(0xffff00) }; + // Input { } + // } + } + } +}