Make more examples cross-platform

This commit is contained in:
Jonathan Kelley committed 2024-01-20 00:11:55 -08:00
1 parent 552ce92c64
commit 3ded0f5329
23 files changed
+99 -105

No files matched your search

+7 -9
View File
@@ -4,16 +4,14 @@ use dioxus::prelude::*;
use rand::{thread_rng, Rng};
fn main() {
launch_desktop(app);
}
fn app() -> Element {
rsx! {
div { user_select: "none", webkit_user_select: "none", margin_left: "10%", margin_right: "10%",
h1 { "Click die to generate a new value" }
div { cursor: "pointer", height: "100%", width: "100%", Dice {} }
launch(|| {
rsx! {
div { user_select: "none", webkit_user_select: "none", margin_left: "10%", margin_right: "10%",
h1 { "Click die to generate a new value" }
div { cursor: "pointer", height: "100%", width: "100%", Dice {} }
}
}
}
});
}
#[component]