Fix cargo check on examples

This commit is contained in:
Jonathan Kelley committed 2024-01-30 17:59:57 -08:00
1 parent 0bd9692e45
commit a72c035de4
42 files changed
+95 -145

No files matched your search

+9 -7
View File
@@ -4,9 +4,10 @@ use std::rc::Rc;
use dioxus::{html::geometry::euclid::Rect, prelude::*};
fn main() {
LaunchBuilder::desktop().with_cfg(
dioxus::desktop::Config::default().with_custom_head(
r#"
LaunchBuilder::desktop()
.with_cfg(
dioxus::desktop::Config::default().with_custom_head(
r#"
<style type="text/css">
html, body {
height: 100%;
@@ -19,16 +20,17 @@ fn main() {
}
</style>
"#
.to_owned(),
),
);
.to_owned(),
),
)
.launch(app);
}
fn app() -> Element {
let mut div_element = use_signal(|| None as Option<Rc<MountedData>>);
let mut dimensions = use_signal(Rect::zero);
let mut read_dims = move |_| async move {
let read_dims = move |_| async move {
let read = div_element.read();
let client_rect = read.as_ref().map(|el| el.get_client_rect());
if let Some(client_rect) = client_rect {