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

@@ -5,12 +5,19 @@ use dioxus_tui::{Config, TuiContext};
fn main() {
for size in 1..=20usize {
for _ in 0..10 {
todo!()
// dioxus_tui::launch_cfg(app, vec![size], Config::default().with_headless())
let dom = VirtualDom::new(app).with_root_context(size);
dioxus_tui::launch_vdom_cfg(dom, Config::default().with_headless())
}
}
}
fn app() -> Element {
let size = use_context::<usize>();
rsx! {
div { width: "100%", height: "100%", Grid { size } }
}
}
#[component]
fn Box(x: usize, y: usize, hue: f32, alpha: f32) -> Element {
let count = use_signal(|| 0);
@@ -87,13 +94,3 @@ fn Grid(size: usize) -> Element {
}
}
}
fn app(props: usize) -> Element {
rsx! {
div{
width: "100%",
height: "100%",
Grid{ size: props }
}
}
}