Skip to content

Commit 84dd4fe

Browse files
committed
Refactor TooltipTrigger to use asChild prop for consistency in Copy and Playlist components
1 parent b1c7581 commit 84dd4fe

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/components/Copy/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ const Copy: React.FC<CopyProps> = ({ content }) => {
3535

3636
return (
3737
<Tooltip>
38-
<TooltipTrigger asChild tabIndex={-1}>
38+
<TooltipTrigger asChild>
3939
<Button
4040
variant='ghost'
4141
disabled={!content}
4242
size='icon'
4343
onClick={handleCopy}
44+
tabIndex={-1}
4445
>
4546
{copied ? <Check /> : <CopyIcon />}
4647
</Button>

src/components/Playlist/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ const Playlist: React.FC<Props> = () => {
156156
content={songsInfo}
157157
action={(content, loaded) => (
158158
<Tooltip>
159-
<TooltipTrigger tabIndex={-1}>
159+
<TooltipTrigger tabIndex={-1} asChild>
160160
<Button
161161
variant='ghost'
162162
size='icon'

0 commit comments

Comments
 (0)