Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 815f536

Browse files
author
Kerry Archibald
committed
update copyright and rename handlers
Signed-off-by: Kerry Archibald <kerrya@element.io>
1 parent 88189e5 commit 815f536

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

src/components/views/elements/AccessibleTooltipButton.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ export default class AccessibleTooltipButton extends React.PureComponent<IToolti
5252
}
5353
}
5454

55-
onMouseOver = () => {
55+
showTooltip = () => {
5656
if (this.props.forceHide) return;
5757
this.setState({
5858
hover: true,
5959
});
6060
};
6161

62-
onMouseLeave = () => {
62+
hideTooltip = () => {
6363
this.setState({
6464
hover: false,
6565
});
@@ -78,10 +78,10 @@ export default class AccessibleTooltipButton extends React.PureComponent<IToolti
7878
return (
7979
<AccessibleButton
8080
{...props}
81-
onMouseOver={this.onMouseOver}
82-
onMouseLeave={this.onMouseLeave}
83-
onFocus={this.onMouseOver}
84-
onBlur={this.onMouseLeave}
81+
showTooltip={this.showTooltip}
82+
hideTooltip={this.hideTooltip}
83+
onFocus={this.showTooltip}
84+
onBlur={this.hideTooltip}
8585
aria-label={title}
8686
>
8787
{ children }

src/components/views/elements/ActionButton.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ export default class ActionButton extends React.Component<IProps, IState> {
5858
};
5959

6060
private onMouseEnter = (): void => {
61-
this.onShowTooltip();
61+
this.showTooltip();
6262
if (this.props.mouseOverAction) {
6363
dis.dispatch({ action: this.props.mouseOverAction });
6464
}
6565
};
6666

67-
private onShowTooltip = (): void => {
67+
private showTooltip = (): void => {
6868
if (this.props.tooltip) this.setState({ showTooltip: true });
6969
};
7070

71-
private onHideTooltip = (): void => {
71+
private hideTooltip = (): void => {
7272
this.setState({ showTooltip: false });
7373
};
7474

@@ -92,9 +92,9 @@ export default class ActionButton extends React.Component<IProps, IState> {
9292
className={classNames.join(" ")}
9393
onClick={this.onClick}
9494
onMouseEnter={this.onMouseEnter}
95-
onMouseLeave={this.onHideTooltip}
96-
onFocus={this.onShowTooltip}
97-
onBlur={this.onHideTooltip}
95+
onMouseLeave={this.hideTooltip}
96+
onFocus={this.showTooltip}
97+
onBlur={this.hideTooltip}
9898
aria-label={this.props.label}
9999
>
100100
{ icon }

src/components/views/elements/TooltipTarget.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/*
2-
Copyright 2017 New Vector Ltd.
3-
Copyright 2019 The Matrix.org Foundation C.I.C.
2+
Copyright 2021 The Matrix.org Foundation C.I.C.
43
54
Licensed under the Apache License, Version 2.0 (the "License");
65
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)