1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00

refactor: fix Tooltip ref warning (#804)

* refactor: fix Tooltip ref warning

* refactor: add missing button labels
This commit is contained in:
olav 2022-03-23 09:12:10 +01:00 committed by GitHub
parent 2a307523d6
commit a16520ddda
2 changed files with 18 additions and 10 deletions

View File

@ -163,12 +163,14 @@ export const StrategiesList = () => {
const reactivateButton = (strategy: ICustomStrategy) => (
<Tooltip title="Reactivate activation strategy">
<PermissionIconButton
onClick={() => onReactivateStrategy(strategy)}
permission={UPDATE_STRATEGY}
>
<VisibilityOff />
</PermissionIconButton>
<div>
<PermissionIconButton
onClick={() => onReactivateStrategy(strategy)}
permission={UPDATE_STRATEGY}
>
<VisibilityOff titleAccess="Reactivate" />
</PermissionIconButton>
</div>
</Tooltip>
);
@ -179,7 +181,7 @@ export const StrategiesList = () => {
<Tooltip title="You cannot deprecate the default strategy">
<div>
<IconButton disabled>
<Visibility />
<Visibility titleAccess="Deprecate strategy" />
</IconButton>
</div>
</Tooltip>
@ -190,7 +192,7 @@ export const StrategiesList = () => {
onClick={() => onDeprecateStrategy(strategy)}
permission={UPDATE_STRATEGY}
>
<Visibility />
<Visibility titleAccess="Deprecate strategy" />
</PermissionIconButton>
</div>
}

View File

@ -159,14 +159,17 @@ exports[`renders correctly with one strategy 1`] = `
className="MuiIconButton-label"
>
<svg
aria-hidden={true}
className="MuiSvgIcon-root"
focusable="false"
role="img"
viewBox="0 0 24 24"
>
<path
d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"
/>
<title>
Deprecate strategy
</title>
</svg>
</span>
<span
@ -431,14 +434,17 @@ exports[`renders correctly with one strategy without permissions 1`] = `
className="MuiIconButton-label"
>
<svg
aria-hidden={true}
className="MuiSvgIcon-root"
focusable="false"
role="img"
viewBox="0 0 24 24"
>
<path
d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"
/>
<title>
Deprecate strategy
</title>
</svg>
</span>
<span