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