mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-12-02 17:09:11 +00:00
67a6fa9eb8
* work on seperating tree struture from realdom * intial update to new mutations * handle height * update to taffy 0.2 * add as_varient functions to OwnedAttributeValue * make get node parent mut optionally return a parent * work on upward pass * add more code for parrellel passes * make resolve passes public * more work on parallel passes * fix deadlock and add more tests * move height into the tree instead of the realdom * make passes exicute in parallel instead of executing invidual passes in parellel * fix some warnings * add up dependant test * clean up examples * work on intigrating state with passes * update to new mutations * work on implementing macro * make the macro compile * more progress on macro * mark cloned nodes as dirty * update persistant_iterator utility * fix mask generation * update tui with new mutations * more progress updating tui * some basic tui examples working * don't push template nodes onto the stack * update hover example * update benchmark * update more examples * fix root node layout * ignore out of bounds renders * update color picker example * update all events example * update remaining examples * update tests * tests passing * move persistant iterator test * update examples * fix gaps in layout * fix formatting * fix memory leak
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]"
|
|
}
|
|
}
|
|
}
|
|
})
|
|
}
|