diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-04-16 12:01:39 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-04-16 12:01:39 +0200 |
| commit | c92ea97d9180fe05ab1adb35a4af0bcb19b12ec9 (patch) | |
| tree | ddd20a989d7c5b0fc9cae12724970d69976f889c /app/components/CustomScrollbars.android.js | |
| parent | c9f2ec62790a62e674b1252a6a18dec451d17bf3 (diff) | |
| parent | 898dd74e5ac86dac2638dc26975b22a9fb0392d4 (diff) | |
| download | mullvadvpn-c92ea97d9180fe05ab1adb35a4af0bcb19b12ec9.tar.xz mullvadvpn-c92ea97d9180fe05ab1adb35a4af0bcb19b12ec9.zip | |
Merge branch 'rn-compatibility'
Diffstat (limited to 'app/components/CustomScrollbars.android.js')
| -rw-r--r-- | app/components/CustomScrollbars.android.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/app/components/CustomScrollbars.android.js b/app/components/CustomScrollbars.android.js new file mode 100644 index 0000000000..8c9ea03da2 --- /dev/null +++ b/app/components/CustomScrollbars.android.js @@ -0,0 +1,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>); + } +} |
