mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-26 22:20:19 +00:00
21 lines
428 B
Rust
21 lines
428 B
Rust
use dioxus::prelude::*;
|
|
|
|
fn main() {
|
|
dioxus_desktop::launch(app);
|
|
}
|
|
|
|
fn app() -> Element {
|
|
let disabled = use_signal(|| false);
|
|
|
|
rsx! {
|
|
div {
|
|
button { onclick: move |_| disabled.toggle(),
|
|
"click to "
|
|
if *disabled() { "enable" } else { "disable" }
|
|
" the lower button"
|
|
}
|
|
|
|
button { disabled, "lower button" }
|
|
}
|
|
}
|
|
}
|