Chore: some cleanup and documentation
This commit is contained in:
1 parent
fe6938ceb3
commit
517d7f1495
39 files changed
+507
-2142
No files matched your search
@@ -14,14 +14,12 @@ fn main() {
|
||||
|
||||
static App: FC<()> = |ctx| {
|
||||
ctx.render(rsx! {
|
||||
h2 { "abc 1" }
|
||||
h2 { "abc 1" }
|
||||
h2 { "abc 1" }
|
||||
h2 { "abc 1" }
|
||||
h2 { "abc 1" }
|
||||
h2 { "abc 1" }
|
||||
div {
|
||||
"hello world!"
|
||||
}
|
||||
Fragment {
|
||||
h2 { "abc 2"}
|
||||
}
|
||||
})
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
use dioxus_web::prelude::*;
|
||||
|
||||
fn main() {
|
||||
wasm_bindgen_futures::spawn_local(dioxus_web::WebsysRenderer::start(App))
|
||||
}
|
||||
|
||||
fn App(ctx: Context<()>) -> VNode {
|
||||
ctx.render(rsx! {
|
||||
div { "Hello, world!" }
|
||||
})
|
||||
}
|
||||
@@ -149,11 +149,11 @@ pub fn FilterToggles(ctx: Context<()>) -> VNode {
|
||||
.iter()
|
||||
.map(|(name, path, filter)| {
|
||||
rsx!(
|
||||
li {
|
||||
class: "{name}"
|
||||
a { "{name}",
|
||||
li { class: "{name}"
|
||||
a {
|
||||
href: "{path}",
|
||||
onclick: move |_| reducer.set_filter(&filter),
|
||||
"{name}",
|
||||
}
|
||||
}
|
||||
)
|
||||
@@ -168,7 +168,7 @@ pub fn FilterToggles(ctx: Context<()>) -> VNode {
|
||||
footer {
|
||||
span {
|
||||
strong {"{items_left}"}
|
||||
span {"{item_text} left"}
|
||||
span { "{item_text} left" }
|
||||
}
|
||||
ul {
|
||||
class: "filters"
|
||||
@@ -180,8 +180,7 @@ pub fn FilterToggles(ctx: Context<()>) -> VNode {
|
||||
|
||||
pub fn Footer(ctx: Context<()>) -> VNode {
|
||||
rsx! { in ctx,
|
||||
footer {
|
||||
class: "info"
|
||||
footer { class: "info"
|
||||
p {"Double-click to edit a todo"}
|
||||
p {
|
||||
"Created by "
|
||||
|
||||
Reference in new issue
Block a user