summaryrefslogtreecommitdiffhomepage
path: root/app/components/CustomScrollbars.android.js
blob: dadc462234b65dee378005720b58929a9ed426a9 (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
// @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>;
  }
}