Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Fix issue with multiple copy buttons being present with multiple code…
Browse files Browse the repository at this point in the history
… block tabs
  • Loading branch information
Dom Harrington committed Aug 10, 2018
1 parent 7a9e182 commit eb11640
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/api-explorer/src/block-types/Code.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class BlockCode extends React.Component {

<div className="block-code-code">
{codes.map((code, i) => (
<React.Fragment>
<div style={{ display: i === this.state.activeTab ? 'block' : 'none' }}>
<CopyCode code={code.code} />
{
// eslint-disable-next-line react/no-array-index-key
Expand All @@ -72,7 +72,7 @@ class BlockCode extends React.Component {
/>
</pre>
}
</React.Fragment>
</div>
))}
</div>
</div>
Expand Down

0 comments on commit eb11640

Please sign in to comment.