wip: add an image
This commit is contained in:
1 parent
dc34805ee6
commit
7b29fbbad0
8 files changed
+331
-174
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
@@ -0,0 +1,59 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
let mut dom = VirtualDom::new(app);
|
||||
dom.rebuild();
|
||||
|
||||
rink::render_vdom(&dom).unwrap();
|
||||
}
|
||||
|
||||
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%",
|
||||
// margin_left: "4px",
|
||||
background_color: "green",
|
||||
|
||||
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]"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
let mut dom = VirtualDom::new(app);
|
||||
dom.rebuild();
|
||||
|
||||
rink::render_vdom(&dom).unwrap();
|
||||
}
|
||||
|
||||
fn app(cx: Scope) -> Element {
|
||||
cx.render(rsx! {
|
||||
div {
|
||||
width: "100%",
|
||||
height: "10px",
|
||||
background_color: "red",
|
||||
justify_content: "center",
|
||||
align_items: "center",
|
||||
|
||||
"Hello world!"
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user