title: Conditionally disabled React Checkboxes
body: <p>I am building out a listing of checkboxes and only want the user to be able to select 2 checkboxes and then it will disable the checkboxes. I have a disabled prop which I can pass a boolean but having trouble with the logic to disable the checkbox. </p>
  
  <pre><code>&lt;UISelectableButton
      key={i}
      block={true}
      value={workflow}
      disabled={selectedRevisions &gt; 1 &amp;&amp; true}
      onSelectedChange={this.onSelectedChange}
      onClick={() =&gt; this.handleRevisions(workflow)}
      type="checkbox"
  /&gt;
  </code></pre>
  
  <p>For the onSelectedChange I have a function that will hold the index of how many checkboxes are currently selected. I can easily disable the buttons with a ternary operator by doing <code>selectedRevisions &gt; 2</code> then anytime there are more than 2 items selected then I disable the buttons. The problem with this is that will disable all the buttons and I don't want to disable any buttons that have been selected. Is there a way to check if the checkbox has been selected and still pass <code>disabled</code> a boolean and not a function. </p>