aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/ui/copy_icon.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/components/ui/copy_icon.tsx')
-rw-r--r--packages/website/ts/components/ui/copy_icon.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/website/ts/components/ui/copy_icon.tsx b/packages/website/ts/components/ui/copy_icon.tsx
index d58e50815..2c2941067 100644
--- a/packages/website/ts/components/ui/copy_icon.tsx
+++ b/packages/website/ts/components/ui/copy_icon.tsx
@@ -23,14 +23,14 @@ export class CopyIcon extends React.Component<CopyIconProps, CopyIconState> {
isHovering: false,
};
}
- public componentDidUpdate() {
+ public componentDidUpdate(): void {
// Remove tooltip if hover away
if (!this.state.isHovering && this._copyTooltipTimeoutId) {
clearInterval(this._copyTooltipTimeoutId);
this._hideTooltip();
}
}
- public render() {
+ public render(): React.ReactNode {
return (
<div className="inline-block">
<CopyToClipboard text={this.props.data} onCopy={this._onCopy.bind(this)}>
@@ -55,15 +55,15 @@ export class CopyIcon extends React.Component<CopyIconProps, CopyIconState> {
</div>
);
}
- private _setRefToProperty(el: HTMLInputElement) {
+ private _setRefToProperty(el: HTMLInputElement): void {
this._copyable = el;
}
- private _setHoverState(isHovering: boolean) {
+ private _setHoverState(isHovering: boolean): void {
this.setState({
isHovering,
});
}
- private _onCopy() {
+ private _onCopy(): void {
if (this._copyTooltipTimeoutId) {
clearInterval(this._copyTooltipTimeoutId);
}
@@ -73,7 +73,7 @@ export class CopyIcon extends React.Component<CopyIconProps, CopyIconState> {
this._hideTooltip();
}, tooltipLifespanMs);
}
- private _hideTooltip() {
+ private _hideTooltip(): void {
ReactTooltip.hide(ReactDOM.findDOMNode(this._copyable));
}
}