summaryrefslogtreecommitdiff
path: root/src/Components/Settings.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Components/Settings.tsx')
-rw-r--r--src/Components/Settings.tsx32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/Components/Settings.tsx b/src/Components/Settings.tsx
index a99e46e..ca481a9 100644
--- a/src/Components/Settings.tsx
+++ b/src/Components/Settings.tsx
@@ -1,5 +1,5 @@
import React, { Component, PureComponent } from 'react';
-import { StyleSheet, View, Text, GestureResponderEvent, ActivityIndicator } from 'react-native';
+import { StyleSheet, View, Text, GestureResponderEvent, ActivityIndicator, Slider, SafeAreaView } from 'react-native';
// import { Button } from 'react-native-vector-icons/FontAwesome';
import { getStatusBarHeight } from '../helper';
import { connect } from 'react-redux';
@@ -20,15 +20,37 @@ class Settings extends PureComponent<Props> {
};
render() {
+ const { filterLevel } = this.props.settings
return (
- <View style={styles.overlay}>
- {/* <Text>{JSON.stringify(this.props)}</Text> */}
- </View>
+ <SafeAreaView style={styles.overlay}>
+ <Text>Мин. Ур.: {filterLevel[0]}</Text>
+ <Slider
+ style={{ width: 150, height: 40 }}
+ minimumValue={0}
+ maximumValue={filterLevel[1]}
+ value={filterLevel[0]}
+ step={1}
+ minimumTrackTintColor="#028ce3"
+ maximumTrackTintColor="#000000"
+ onSlidingComplete={this.props.setLevelFrom}
+ />
+ <Text>Макс. Ур.: {filterLevel[1]}</Text>
+ <Slider
+ style={{ width: 150, height: 40 }}
+ minimumValue={filterLevel[0]}
+ maximumValue={8}
+ value={filterLevel[1]}
+ step={1}
+ minimumTrackTintColor="#028ce3"
+ maximumTrackTintColor="#000000"
+ onSlidingComplete={this.props.setLevelTo}
+ />
+ </SafeAreaView>
);
}
}
-export default connect((store) => ({}), (dispatch) => bindActionCreators(actions, dispatch))(Settings)
+export default connect((store) => ({ settings: store.settings }), (dispatch) => bindActionCreators(actions, dispatch))(Settings)
const styles = StyleSheet.create({
overlay: {