-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
26 lines (22 loc) · 782 Bytes
/
App.js
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
import React from "react";
import { StyleSheet, Text, View } from "react-native";
import Slider from "@react-native-community/slider";
export default function App() {
return (
<View style={styles.container}>
<Text>Can change the value if numberOfSteps more than 7</Text>
<Slider minimumValue={0} maximumValue={6} step={1} value={3} />
<Text>Can only increase the value if numberOfSteps eq 6</Text>
<Slider minimumValue={0} maximumValue={5} step={1} value={3} />
<Text>Can't move slider if numberOfSteps less than 5</Text>
<Slider minimumValue={0} maximumValue={4} step={1} value={3} />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
justifyContent: "center",
},
});