mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 06:30:20 +00:00
22 lines
383 B
Rust
22 lines
383 B
Rust
use dioxus::prelude::*;
|
|
|
|
fn main() {
|
|
launch_desktop(app);
|
|
}
|
|
|
|
fn app() -> Element {
|
|
let onclick = move |_| {
|
|
let dom = VirtualDom::new(popup);
|
|
dioxus::desktop::window().new_window(dom, Default::default());
|
|
};
|
|
|
|
rsx! {
|
|
button { onclick, "New Window" }
|
|
}
|
|
}
|
|
|
|
fn popup() -> Element {
|
|
rsx! {
|
|
div { "This is a popup window!" }
|
|
}
|
|
}
|