-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpicker.js
39 lines (37 loc) · 1.02 KB
/
picker.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
import React from 'react';
import {StyleSheet} from 'react-native'
import {Picker} from '@react-native-picker/picker'
import App from './App'
class Selecionar extends React.Component{
state = {
prioridade: ''
}
constructor(props){
super(props)
}
render(){
return (
<Picker style={styles.pickerComponent}
selectedValue = {this.state.prioridade}
onValueChange = {
(itemvalor,itemindex) =>
this.setState({
prioridade: itemvalor
})
}
>
<Picker.Item label='Prioridade da Atividade:' value=''/>
<Picker.Item label='High' value='High'/>
<Picker.Item label='Medium' value='Medium'/>
<Picker.Item label='Low' value='Low'/>
</Picker>
);
};
}
const styles = StyleSheet.create({
pickerComponent: {
width: 250,
borderColor: 'gray'
},
});
export default Selecionar;