mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-12-30 06:23:07 +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
82 lines
2 KiB
Rust
82 lines
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",
|
|
// justify_content: "center",
|
|
// align_items: "center",
|
|
// flex_direction: "row",
|
|
// background_color: "red",
|
|
|
|
p {
|
|
background_color: "black",
|
|
flex_direction: "column",
|
|
justify_content: "center",
|
|
align_items: "center",
|
|
// height: "10%",
|
|
"hi"
|
|
"hi"
|
|
"hi"
|
|
}
|
|
|
|
li {
|
|
background_color: "red",
|
|
flex_direction: "column",
|
|
justify_content: "center",
|
|
align_items: "center",
|
|
// height: "10%",
|
|
"bib"
|
|
"bib"
|
|
"bib"
|
|
"bib"
|
|
"bib"
|
|
"bib"
|
|
"bib"
|
|
"bib"
|
|
}
|
|
li {
|
|
background_color: "blue",
|
|
flex_direction: "column",
|
|
justify_content: "center",
|
|
align_items: "center",
|
|
// height: "10%",
|
|
"zib"
|
|
"zib"
|
|
"zib"
|
|
"zib"
|
|
"zib"
|
|
"zib"
|
|
"zib"
|
|
"zib"
|
|
"zib"
|
|
"zib"
|
|
"zib"
|
|
"zib"
|
|
"zib"
|
|
}
|
|
p {
|
|
background_color: "yellow",
|
|
"asd"
|
|
}
|
|
p {
|
|
background_color: "green",
|
|
"asd"
|
|
}
|
|
p {
|
|
background_color: "white",
|
|
"asd"
|
|
}
|
|
p {
|
|
background_color: "cyan",
|
|
"asd"
|
|
}
|
|
}
|
|
})
|
|
}
|