mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-28 17:55:15 +02:00
fix: permission button tooltip behavior (#8882)
https://linear.app/unleash/issue/2-3039/fix-the-tooltip-behavior-in-permission-buttons Improves the tooltip behavior of our permission button component. This is achieved by removing the extra `span` element that is wrapping the `Button` component. #### Before The tooltip is not correctly aligned with the button. The lower section of the button is not clickable.  #### After The tooltip is correctly aligned with the button. Every visible part of the button is clickable. 
This commit is contained in:
parent
f75cf1dc60
commit
226b48930e
@ -104,7 +104,6 @@ const BasePermissionButton = React.forwardRef<
|
|||||||
title={formatAccessText(access, tooltipProps?.title)}
|
title={formatAccessText(access, tooltipProps?.title)}
|
||||||
arrow
|
arrow
|
||||||
>
|
>
|
||||||
<span id={id}>
|
|
||||||
<Button
|
<Button
|
||||||
ref={ref}
|
ref={ref}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
@ -117,7 +116,6 @@ const BasePermissionButton = React.forwardRef<
|
|||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Button>
|
</Button>
|
||||||
</span>
|
|
||||||
</TooltipResolver>
|
</TooltipResolver>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -73,9 +73,6 @@ exports[`renders an empty list correctly 1`] = `
|
|||||||
<hr
|
<hr
|
||||||
className="MuiDivider-root MuiDivider-middle MuiDivider-vertical css-1cqsk4j-MuiDivider-root"
|
className="MuiDivider-root MuiDivider-middle MuiDivider-vertical css-1cqsk4j-MuiDivider-root"
|
||||||
/>
|
/>
|
||||||
<span
|
|
||||||
id="useId-0"
|
|
||||||
>
|
|
||||||
<button
|
<button
|
||||||
aria-labelledby="useId-0"
|
aria-labelledby="useId-0"
|
||||||
className="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium css-om67xs-MuiButtonBase-root-MuiButton-root"
|
className="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium css-om67xs-MuiButtonBase-root-MuiButton-root"
|
||||||
@ -101,7 +98,6 @@ exports[`renders an empty list correctly 1`] = `
|
|||||||
className="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
|
className="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user