1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: fix two disabled tooltips (#8464)

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.
This commit is contained in:
Thomas Heartman 2024-10-16 15:25:50 +02:00 committed by GitHub
parent cb0a26941b
commit 131e608885
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 16 deletions

View File

@ -53,6 +53,7 @@ export const ArchiveButton: VFC<IArchiveButtonProps> = ({
<> <>
<PermissionHOC projectId={projectId} permission={DELETE_FEATURE}> <PermissionHOC projectId={projectId} permission={DELETE_FEATURE}>
{({ hasAccess }) => ( {({ hasAccess }) => (
<span>
<Button <Button
disabled={!hasAccess || isDialogOpen} disabled={!hasAccess || isDialogOpen}
variant='outlined' variant='outlined'
@ -61,6 +62,7 @@ export const ArchiveButton: VFC<IArchiveButtonProps> = ({
> >
Archive Archive
</Button> </Button>
</span>
)} )}
</PermissionHOC> </PermissionHOC>
<FeatureArchiveDialog <FeatureArchiveDialog

View File

@ -96,6 +96,7 @@ export const ManageTags: VFC<IManageTagsProps> = ({
<> <>
<PermissionHOC projectId={projectId} permission={UPDATE_FEATURE}> <PermissionHOC projectId={projectId} permission={UPDATE_FEATURE}>
{({ hasAccess }) => ( {({ hasAccess }) => (
<span>
<Button <Button
disabled={!hasAccess || isOpen} disabled={!hasAccess || isOpen}
variant='outlined' variant='outlined'
@ -104,6 +105,7 @@ export const ManageTags: VFC<IManageTagsProps> = ({
> >
Tags Tags
</Button> </Button>
</span>
)} )}
</PermissionHOC> </PermissionHOC>
<ManageBulkTagsDialog <ManageBulkTagsDialog