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

Loading…
Cancel
Save