mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 04:33:10 +00:00
chore/and operator instead of ternary operator (#2064)
This commit is contained in:
committed by
Alexey Pyltsyn
parent
2d9c2785dd
commit
263ef8b5fd
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user