summaryrefslogtreecommitdiffhomepage
path: root/app/components/CustomScrollbars.android.js
blob: 8c9ea03da2e609247646de4286258ba9e245e114 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// @flow

import * as React from 'react';
import { View, Component } from 'reactxp';

type Props = {
  autoHide: boolean,
  thumbInset: { x: number, y: number },
  children?: React.Node,
};

type State = {
  canScroll: boolean,
  showScrollIndicators: boolean,
};

export default class CustomScrollbars extends Component<Props, State> {
  static defaultProps = {
    autoHide: true,
    thumbInset: { x: 2, y: 2 },
  };

  state = {
    canScroll: false,
    showScrollIndicators: true,
  };

  render() {
    const { autoHide: _autoHide, thumbInset: _thumbInset, children, ...otherProps } = this.props;

    return (
      <View { ...otherProps }>
        { children }
      </View>);
  }
}