2022-01-08 07:10:47 +00:00
|
|
|
use dioxus::prelude::*;
|
|
|
|
|
|
|
|
fn main() {
|
2024-01-16 17:45:02 +00:00
|
|
|
launch_desktop(app);
|
2022-01-08 07:10:47 +00:00
|
|
|
}
|
|
|
|
|
2024-01-14 04:51:37 +00:00
|
|
|
fn app() -> Element {
|
2024-01-16 07:24:59 +00:00
|
|
|
let mut disabled = use_signal(|| false);
|
2022-01-08 07:10:47 +00:00
|
|
|
|
2024-01-16 19:18:46 +00:00
|
|
|
rsx! {
|
2022-01-08 07:10:47 +00:00
|
|
|
div {
|
2024-01-15 21:06:05 +00:00
|
|
|
button { onclick: move |_| disabled.toggle(),
|
2022-03-01 07:50:03 +00:00
|
|
|
"click to "
|
2024-01-16 05:12:44 +00:00
|
|
|
if disabled() { "enable" } else { "disable" }
|
2022-03-01 07:50:03 +00:00
|
|
|
" the lower button"
|
2022-01-08 07:10:47 +00:00
|
|
|
}
|
|
|
|
|
2024-01-15 21:06:05 +00:00
|
|
|
button { disabled, "lower button" }
|
2022-01-08 07:10:47 +00:00
|
|
|
}
|
2024-01-14 05:12:21 +00:00
|
|
|
}
|
2022-01-08 07:10:47 +00:00
|
|
|
}
|