dioxus/examples/filedragdrop.rs

19 lines
329 B
Rust
Raw Normal View History

2022-01-10 17:57:39 +00:00
use dioxus::prelude::*;
fn main() {
dioxus::desktop::launch_with_props(app, (), |c| {
2022-01-25 00:52:12 +00:00
c.with_file_drop_handler(|_w, e| {
2022-01-10 17:57:39 +00:00
println!("{:?}", e);
true
2022-01-10 17:57:39 +00:00
})
});
}
fn app(cx: Scope) -> Element {
cx.render(rsx!(
div {
h1 { "drag an file here" }
}
))
}