Browse Source

chore/and operator instead of ternary operator (#2064)

main
Jan Rochalski 6 years ago
committed by Alexey Pyltsyn
parent
commit
263ef8b5fd
  1. 8
      content/docs/accessibility.md

8
content/docs/accessibility.md

@ -282,13 +282,13 @@ class OuterClickExample extends React.Component {
return ( return (
<div ref={this.toggleContainer}> <div ref={this.toggleContainer}>
<button onClick={this.onClickHandler}>Select an option</button> <button onClick={this.onClickHandler}>Select an option</button>
{this.state.isOpen ? ( {this.state.isOpen && (
<ul> <ul>
<li>Option 1</li> <li>Option 1</li>
<li>Option 2</li> <li>Option 2</li>
<li>Option 3</li> <li>Option 3</li>
</ul> </ul>
) : null} )}
</div> </div>
); );
} }
@ -348,13 +348,13 @@ class BlurExample extends React.Component {
aria-expanded={this.state.isOpen}> aria-expanded={this.state.isOpen}>
Select an option Select an option
</button> </button>
{this.state.isOpen ? ( {this.state.isOpen && (
<ul> <ul>
<li>Option 1</li> <li>Option 1</li>
<li>Option 2</li> <li>Option 2</li>
<li>Option 3</li> <li>Option 3</li>
</ul> </ul>
) : null} )}
</div> </div>
); );
} }

Loading…
Cancel
Save