Skip to content

Commit 49d46ba

Browse files
author
Martin Lopes
authored
Merge branch 'main' into 5765-private-profile
2 parents 5aa3356 + 0dda6a1 commit 49d46ba

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

components/rest/CodeBlock.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import styles from './CodeBlock.module.scss'
88

99
type Props = {
1010
verb?: string
11+
// Only Code samples should have a copy icon - if there's a headingLang it's a code sample
1112
headingLang?: string
1213
codeBlock: string
1314
highlight?: string
@@ -55,13 +56,6 @@ export function CodeBlock({ verb, headingLang, codeBlock, highlight }: Props) {
5556
)}{' '}
5657
{codeBlock}
5758
</code>
58-
{!headingLang && (
59-
<Tooltip direction="w" aria-label={isCopied ? 'Copied!' : 'Copy to clipboard'}>
60-
<button className="js-btn-copy btn-octicon" onClick={() => setCopied()}>
61-
{isCopied ? <CheckIcon /> : <CopyIcon />}
62-
</button>
63-
</Tooltip>
64-
)}
6559
</pre>
6660
</div>
6761
)

0 commit comments

Comments
 (0)