mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-12-21 01:53:15 +00:00
d9546d9504
* feat: use synchronous router design * feat: function to get router out of dom * chore: restructure workspace to use renderers as packages, not features
50 lines
1.2 KiB
Rust
50 lines
1.2 KiB
Rust
use dioxus::prelude::*;
|
|
|
|
fn main() {
|
|
dioxus_tui::launch(app);
|
|
}
|
|
|
|
fn app(cx: Scope) -> Element {
|
|
cx.render(rsx! {
|
|
div {
|
|
width: "100%",
|
|
height: "100%",
|
|
flex_direction: "column",
|
|
background_color: "black",
|
|
// margin_right: "10px",
|
|
|
|
div {
|
|
width: "70%",
|
|
height: "70%",
|
|
background_color: "green",
|
|
// margin_left: "4px",
|
|
|
|
div {
|
|
width: "100%",
|
|
height: "100%",
|
|
|
|
margin_top: "2px",
|
|
margin_bottom: "2px",
|
|
margin_left: "2px",
|
|
margin_right: "2px",
|
|
flex_shrink: "0",
|
|
|
|
background_color: "red",
|
|
justify_content: "center",
|
|
align_items: "center",
|
|
flex_direction: "column",
|
|
|
|
// padding_top: "2px",
|
|
// padding_bottom: "2px",
|
|
// padding_left: "4px",
|
|
// padding_right: "4px",
|
|
|
|
"[A]"
|
|
"[A]"
|
|
"[A]"
|
|
"[A]"
|
|
}
|
|
}
|
|
}
|
|
})
|
|
}
|