dioxus/examples/filedragdrop.rs

19 lines
351 B
Rust
Raw Normal View History

2022-01-10 12:57:39 -05:00
use dioxus::prelude::*;
fn main() {
dioxus::desktop::launch_with_props(app, (), |c| {
2022-01-24 19:52:12 -05:00
c.with_file_drop_handler(|_w, e| {
2022-01-10 12:57:39 -05:00
println!("{:?}", e);
true
2022-01-10 12:57:39 -05:00
})
});
}
fn app(cx: Scope) -> Element {
cx.render(rsx!(
div {
2022-03-05 15:25:09 -05:00
h1 { "drag a file here and check your console" }
2022-01-10 12:57:39 -05:00
}
))
}