How to dynamically disable EuiButton in Elastic UI

I'm new to Elastic UI and React. Can you tell me how to dynamically disable a EuiButton? I know for a regular React button you can do it by passing the state of the button like the following:

<button disabled={!this.state.buttonDisabled} onClick={this.doSomething}>

However, I can't seem to find a way to pass the state for the EuiButton. You have to pass in the "isDisabled" option when building the button like this

<EuiButton size="xs" isDisabled Button Text </EuiButton>

How do i dynamically pass in the "isDisabled" option like I would for a regular React button?

It works the same way there, the property is just called isDisabled instead of disabled:

<EuiButton size="xs" isDisabled={!this.state.buttonDisabled} onClick={this.doSomething}>
  Button Text
</EuiButton>

Thank you! I could have sworn I tried it that way but evidently I didn't. It's working now. Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.