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