Skip to content

Commit b7902e6

Browse files
authored
Merge pull request #34566 from github/repo-sync
Repo sync
2 parents 968d026 + 02473b8 commit b7902e6

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

src/rest/components/RestCodeSamples.tsx

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useState, useEffect, useRef, FormEvent } from 'react'
2-
import { FormControl, Select, TabNav } from '@primer/react'
3-
import { Tooltip } from '@primer/react/next'
2+
import { FormControl, IconButton, Select, TabNav } from '@primer/react'
43
import { CheckIcon, CopyIcon } from '@primer/octicons-react'
54
import { announce } from '@primer/live-region-element'
65
import Cookies from 'src/frame/components/lib/cookies'
@@ -282,22 +281,15 @@ export function RestCodeSamples({ operation, slug, heading }: Props) {
282281
</TabNav>
283282
</div>
284283
<div className="mr-2">
285-
<Tooltip
286-
className="mr-2"
287-
direction="w"
288-
text={isCopied ? t('button_text.copied') : t('button_text.copy_to_clipboard')}
289-
>
290-
<button
291-
className="js-btn-copy btn-octicon"
292-
aria-label={`${t('button_text.copy_to_clipboard')} ${selectedLanguage} request example`}
293-
onClick={() => {
294-
setCopied()
295-
announce('Copied!')
296-
}}
297-
>
298-
{isCopied ? <CheckIcon /> : <CopyIcon />}
299-
</button>
300-
</Tooltip>
284+
<IconButton
285+
icon={isCopied ? CheckIcon : CopyIcon}
286+
className="js-btn-copy btn-octicon"
287+
aria-label={`${t('button_text.copy_to_clipboard')} ${selectedLanguage} request example`}
288+
onClick={() => {
289+
setCopied()
290+
announce('Copied!')
291+
}}
292+
></IconButton>
301293
</div>
302294
</div>
303295

0 commit comments

Comments
 (0)