diff --git a/demo_markdown/docs/spin_button/mod.md b/demo_markdown/docs/spin_button/mod.md index 8204702..1374443 100644 --- a/demo_markdown/docs/spin_button/mod.md +++ b/demo_markdown/docs/spin_button/mod.md @@ -7,7 +7,27 @@ let value_f64 = RwSignal::new(0.0); view! { - + } +``` + +### Min / Max + +```rust demo +let value = RwSignal::new(0); + +view! { + +} +``` + +### Disabled + +```rust demo +let value = RwSignal::new(0); + +view! { + +} ``` \ No newline at end of file diff --git a/thaw/src/spin_button/mod.rs b/thaw/src/spin_button/mod.rs index e6aa277..41d068d 100644 --- a/thaw/src/spin_button/mod.rs +++ b/thaw/src/spin_button/mod.rs @@ -48,12 +48,13 @@ where } }; - let increment_disabled = Memo::new(move |_| disabled.get() || value.get() <= min.get()); - let decrement_disabled = Memo::new(move |_| disabled.get() || value.get() >= max.get()); + let increment_disabled = Memo::new(move |_| disabled.get() || value.get() >= max.get()); + let decrement_disabled = Memo::new(move |_| disabled.get() || value.get() <= min.get()); view! {