-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathWheelPickerComponent.js
64 lines (59 loc) · 1.36 KB
/
WheelPickerComponent.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import React, { Component } from 'react';
import {
AppRegistry,
Text,
Button,
View,
ScrollView,
StyleSheet,
TouchableOpacity
} from 'react-native';
import { StackNavigator } from 'react-navigation';
import SnackBarCustom from 'react-native-custom-snackbar';
import {WheelPicker, DatePicker, TimePicker} from 'react-native-wheel-picker-android'
class WheelPickerComponent extends React.Component {
constructor()
{
super();
}
render() {
var{params}=this.props.navigation.state;
return (
<View style = { styles.container }>
<TimePicker
style={{flex: 1}}
selectedValue={1}
pickerData={[1, 2, 3, 4, 5, 6]}
onValueChange={(value) => this.setState({value})}
/>
</View>
);
}
}
WheelPickerComponent.navigationOptions = {
title: 'WheelPickerComponent Screen',
};
const styles = StyleSheet.create({
container:
{
flex: 1,
justifyContent: 'center',
alignItems: 'center',
paddingHorizontal: 15,
// paddingTop: (Platform.OS) === 'ios' ? 20 : 0
},
button:
{
backgroundColor: 'rgba(0,0,0,0.6)',
padding: 10,
alignSelf: 'stretch'
},
btnText:
{
alignSelf: 'stretch',
color: 'white',
fontSize: 18,
textAlign: 'center'
}
})
export default WheelPickerComponent;