Skip to content

Commit

Permalink
fix: fix two disabled tooltips (#8464)
Browse files Browse the repository at this point in the history
Fix this warning:

> MUI: You are providing a disabled button child to the Tooltip
component.
> A disabled element does not fire events.
> Tooltip needs to listen to the child element’s events to display the
title.
> Add a simple wrapper element, such as a span.
  • Loading branch information
thomasheartman authored Oct 16, 2024
1 parent cb0a269 commit 131e608
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,16 @@ export const ArchiveButton: VFC<IArchiveButtonProps> = ({
<>
<PermissionHOC projectId={projectId} permission={DELETE_FEATURE}>
{({ hasAccess }) => (
<Button
disabled={!hasAccess || isDialogOpen}
variant='outlined'
size='small'
onClick={() => setIsDialogOpen(true)}
>
Archive
</Button>
<span>
<Button
disabled={!hasAccess || isDialogOpen}
variant='outlined'
size='small'
onClick={() => setIsDialogOpen(true)}
>
Archive
</Button>
</span>
)}
</PermissionHOC>
<FeatureArchiveDialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,16 @@ export const ManageTags: VFC<IManageTagsProps> = ({
<>
<PermissionHOC projectId={projectId} permission={UPDATE_FEATURE}>
{({ hasAccess }) => (
<Button
disabled={!hasAccess || isOpen}
variant='outlined'
size='small'
onClick={() => setIsOpen(true)}
>
Tags
</Button>
<span>
<Button
disabled={!hasAccess || isOpen}
variant='outlined'
size='small'
onClick={() => setIsOpen(true)}
>
Tags
</Button>
</span>
)}
</PermissionHOC>
<ManageBulkTagsDialog
Expand Down

0 comments on commit 131e608

Please sign in to comment.