2
0
Fork 0
mirror of https://github.com/DioxusLabs/dioxus synced 2025-02-19 15:18:27 +00:00
dioxus/packages/dioxus-tui/examples/margin.rs

51 lines
1.2 KiB
Rust
Raw Normal View History

2022-01-01 01:08:31 -05:00
use dioxus::prelude::*;
fn main() {
dioxus_tui::launch(app);
2022-01-01 01:08:31 -05:00
}
fn app() -> Element {
2024-01-13 21:12:21 -08:00
rsx! {
2022-01-01 01:08:31 -05:00
div {
width: "100%",
height: "100%",
flex_direction: "column",
background_color: "black",
margin_right: "10px",
2022-01-01 01:08:31 -05:00
div {
width: "70%",
height: "70%",
background_color: "green",
margin_left: "4px",
2022-01-01 01:08:31 -05:00
div {
width: "100%",
height: "100%",
margin_top: "2px",
margin_bottom: "2px",
margin_left: "2px",
margin_right: "2px",
2022-01-12 09:40:36 -05:00
flex_shrink: "0",
2022-01-01 01:08:31 -05:00
background_color: "red",
justify_content: "center",
align_items: "center",
flex_direction: "column",
padding_top: "2px",
padding_bottom: "2px",
padding_left: "4px",
padding_right: "4px",
2022-01-01 01:08:31 -05:00
"[A]"
"[A]"
"[A]"
"[A]"
}
}
}
2024-01-13 21:12:21 -08:00
}
2022-01-01 01:08:31 -05:00
}