Extract tooltipYOffset to a const

This commit is contained in:
Michael Telatynski 2021-08-05 14:43:44 +01:00
parent e1b62ae38b
commit b860acca80

View file

@ -82,6 +82,8 @@ interface IState {
sidebarShown: boolean;
}
const tooltipYOffset = -24;
function getFullScreenElement() {
return (
document.fullscreenElement ||
@ -490,7 +492,7 @@ export default class CallView extends React.Component<IProps, IState> {
onClick={this.onVidMuteClick}
title={this.state.vidMuted ? _t("Start the camera") : _t("Stop the camera")}
alignment={Alignment.Top}
yOffset={-24}
yOffset={tooltipYOffset}
/>
);
}
@ -513,7 +515,7 @@ export default class CallView extends React.Component<IProps, IState> {
: _t("Start sharing your screen")
}
alignment={Alignment.Top}
yOffset={-24}
yOffset={tooltipYOffset}
/>
);
}
@ -549,7 +551,7 @@ export default class CallView extends React.Component<IProps, IState> {
isExpanded={this.state.showMoreMenu}
title={_t("More")}
alignment={Alignment.Top}
yOffset={-24}
yOffset={tooltipYOffset}
/>
);
}
@ -563,7 +565,7 @@ export default class CallView extends React.Component<IProps, IState> {
isExpanded={this.state.showDialpad}
title={_t("Dialpad")}
alignment={Alignment.Top}
yOffset={-24}
yOffset={tooltipYOffset}
/>
);
}
@ -610,7 +612,7 @@ export default class CallView extends React.Component<IProps, IState> {
onClick={this.onMicMuteClick}
title={this.state.micMuted ? _t("Unmute the microphone") : _t("Mute the microphone")}
alignment={Alignment.Top}
yOffset={-24}
yOffset={tooltipYOffset}
/>
{ vidMuteButton }
<div className={micCacheClasses} />
@ -623,7 +625,7 @@ export default class CallView extends React.Component<IProps, IState> {
onClick={this.onHangupClick}
title={_t("Hangup")}
alignment={Alignment.Top}
yOffset={-24}
yOffset={tooltipYOffset}
/>
</div>
);