Fix call react button lingering tooltip
This commit is contained in:
parent
bef5fd6b34
commit
f02a11bc9b
2 changed files with 32 additions and 28 deletions
|
@ -110,10 +110,6 @@
|
|||
margin-block: -5px;
|
||||
}
|
||||
|
||||
.CallControls__ReactButtonContainer--menu-shown .module-tooltip {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.CallControls__OuterSpacer {
|
||||
// Defined in _modules but duplicated here for ease of refactor
|
||||
$local-preview-width: 108px;
|
||||
|
|
|
@ -111,18 +111,7 @@ export function CallingButton({
|
|||
tooltipContent = i18n('icu:CallingButton--more-options');
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="CallingButton">
|
||||
<Tooltip
|
||||
className="CallingButton__tooltip"
|
||||
wrapperClassName={classNames(
|
||||
'CallingButton__button-container',
|
||||
!isVisible && 'CallingButton__button-container--hidden'
|
||||
)}
|
||||
content={tooltipContent}
|
||||
direction={tooltipDirection}
|
||||
theme={Theme.Dark}
|
||||
>
|
||||
const buttonContent = (
|
||||
<button
|
||||
aria-label={tooltipContent}
|
||||
className={classNames(
|
||||
|
@ -138,7 +127,26 @@ export function CallingButton({
|
|||
>
|
||||
<div />
|
||||
</button>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="CallingButton">
|
||||
{tooltipContent === '' ? (
|
||||
<div className="CallingButton__button-container">{buttonContent}</div>
|
||||
) : (
|
||||
<Tooltip
|
||||
className="CallingButton__tooltip"
|
||||
wrapperClassName={classNames(
|
||||
'CallingButton__button-container',
|
||||
!isVisible && 'CallingButton__button-container--hidden'
|
||||
)}
|
||||
content={tooltipContent}
|
||||
direction={tooltipDirection}
|
||||
theme={Theme.Dark}
|
||||
>
|
||||
{buttonContent}
|
||||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue