Fix cargo check on examples
This commit is contained in:
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 }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user