summaryrefslogtreecommitdiffhomepage
path: root/app/components/CustomScrollbars.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/components/CustomScrollbars.js')
-rw-r--r--app/components/CustomScrollbars.js22
1 files changed, 14 insertions, 8 deletions
diff --git a/app/components/CustomScrollbars.js b/app/components/CustomScrollbars.js
index 69381f60cd..97c78f4ab9 100644
--- a/app/components/CustomScrollbars.js
+++ b/app/components/CustomScrollbars.js
@@ -1,5 +1,6 @@
// @flow
-import React, { Component } from 'react';
+
+import * as React from 'react';
type ScrollbarUpdateContext = {
size: boolean,
@@ -8,13 +9,18 @@ type ScrollbarUpdateContext = {
const AUTOHIDE_TIMEOUT = 1000;
-export default class CustomScrollbars extends Component {
- props: {
- autoHide: boolean,
- thumbInset: { x: number, y: number },
- children: ?React.Element<*>,
- };
+type Props = {
+ autoHide: boolean,
+ thumbInset: { x: number, y: number },
+ children?: React.Node,
+};
+
+type State = {
+ canScroll: boolean,
+ showScrollIndicators: boolean,
+};
+export default class CustomScrollbars extends React.Component<Props, State> {
static defaultProps = {
autoHide: true,
thumbInset: { x: 2, y: 2 },
@@ -27,7 +33,7 @@ export default class CustomScrollbars extends Component {
_scrollableElement: ?HTMLElement;
_thumbElement: ?HTMLElement;
- _autoHideTimer: ?number;
+ _autoHideTimer: ?TimeoutID;
componentDidMount() {
this._updateScrollbarsHelper({