1
0

tui_list.rs 580 B

12345678910111213141516171819202122232425262728
  1. use dioxus::prelude::*;
  2. fn main() {
  3. dioxus::tui::launch(app);
  4. }
  5. fn app(cx: Scope) -> Element {
  6. cx.render(rsx! {
  7. div {
  8. width: "100%",
  9. height: "100%",
  10. flex_direction: "column",
  11. border_width: "1px",
  12. h1 { height: "2px", color: "green",
  13. "that's awesome!"
  14. }
  15. ul {
  16. flex_direction: "column",
  17. padding_left: "3px",
  18. (0..10).map(|i| rsx!(
  19. "> hello {i}"
  20. ))
  21. }
  22. }
  23. })
  24. }