dioxus/examples/filedragdrop.rs

18 lines
339 B
Rust
Raw Normal View History

2022-01-10 12:57:39 -05:00
use dioxus::prelude::*;
use dioxus_desktop::Config;
2022-01-10 12:57:39 -05:00
fn main() {
LaunchBuilder::new(app)
.cfg(Config::new().with_file_drop_handler(|_w, e| {
2024-01-15 13:06:05 -08:00
println!("{e:?}");
true
}))
.launch()
2022-01-10 12:57:39 -05:00
}
fn app() -> Element {
2024-01-13 21:12:21 -08:00
rsx!(
div { h1 { "drag a file here and check your console" } }
2024-01-13 21:12:21 -08:00
)
2022-01-10 12:57:39 -05:00
}