diff --git a/yewprint/src/buttons.rs b/yewprint/src/buttons.rs index 65150b0..8156df0 100644 --- a/yewprint/src/buttons.rs +++ b/yewprint/src/buttons.rs @@ -78,7 +78,7 @@ impl Component for Button { self.props.class.clone(), ) style=self.props.style.clone() - onclick={self.props.onclick.clone()} + onclick=(!self.props.disabled).then(|| self.props.onclick.clone()) > { self