-
Notifications
You must be signed in to change notification settings - Fork 755
/
picker-text-itemtext.js
76 lines (72 loc) · 1.83 KB
/
picker-text-itemtext.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
65
66
67
68
69
70
71
72
73
74
75
76
import React, { Component } from "react";
import {
Container,
Header,
Title,
Content,
Button,
Icon,
Right,
Body,
Left,
Picker,
Form
} from "native-base";
import styles from "./styles";
const Item = Picker.Item;
class PickerTextItemText extends Component {
constructor(props) {
super(props);
this.state = {
selected2: undefined
};
}
onValueChange2(value: string) {
this.setState({
selected2: value
});
}
render() {
return (
<Container style={styles.container}>
<Header>
<Left>
<Button transparent onPress={() => this.props.navigation.goBack()}>
<Icon name="arrow-back" />
</Button>
</Left>
<Body style={{ flex: 3 }}>
<Title>Picker Text & Item Text</Title>
</Body>
<Right />
</Header>
<Content>
<Form>
<Picker
mode="dropdown"
iosIcon={<Icon name="ios-arrow-down" />}
style={{ width: undefined }}
placeholder="Select your SIM"
textStyle={{ color: "#5cb85c" }}
itemStyle={{
backgroundColor: "#d3d3d3",
marginLeft: 0,
paddingLeft: 10
}}
itemTextStyle={{ color: "#788ad2" }}
selectedValue={this.state.selected2}
onValueChange={this.onValueChange2.bind(this)}
>
<Item label="Wallet" value="key0" />
<Item label="ATM Card" value="key1" />
<Item label="Debit Card" value="key2" />
<Item label="Credit Card" value="key3" />
<Item label="Net Banking" value="key4" />
</Picker>
</Form>
</Content>
</Container>
);
}
}
export default PickerTextItemText;