-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextraNotes.js
More file actions
122 lines (109 loc) · 4.13 KB
/
extraNotes.js
File metadata and controls
122 lines (109 loc) · 4.13 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
return (
<View style={{flex:1, backgroundColor: '#f3f3f3'}}>
{/* Rest of the app comes ABOVE the action button component !*/}
<ActionButton buttonColor="rgba(231,76,60,1)">
<ActionButton.Item buttonColor='#9b59b6' title="New Task" onPress={() => console.log("notes tapped!")}>
<Icon name="md-create" style={styles.actionButtonIcon} />
</ActionButton.Item>
<ActionButton.Item buttonColor='#3498db' title="Notifications" onPress={() => {}}>
<Icon name="md-notifications-off" style={styles.actionButtonIcon} />
</ActionButton.Item>
<ActionButton.Item buttonColor='#1abc9c' title="All Tasks" onPress={() => {}}>
<Icon name="md-done-all" style={styles.actionButtonIcon} />
</ActionButton.Item>
</ActionButton>
</View>
);
<TouchableOpacity
style={{
...styles.openButton,
backgroundColor: "#A251F9",
marginBottom: 7,
}}
onPress={() => {
setPicker(true);
}}
>
<Text style={styles.textStyle}>Categoria</Text>
{/* this is for manual add */}
</TouchableOpacity>
<Modal
animationType="slide"
transparent={true}
visible={picker}
// onRequestClose={() => {
// Alert.alert("Modal has been closed.");
// }}
>
<View style={styles.centeredView}>
<View style={styles.modalView}>
<Picker
selectedValue={picked}
mode="dropdown"
style={{
height: 30,
marginTop: 20,
marginBottom: 30,
width: "100%",
justifyContent: "center",
}}
itemStyle={{ fontSize: 16 }}
onValueChange={(itemValue) =>
setPicked(itemValue)
}
>
{catOptions.map((item, index) => {
return (
<Picker.Item
label={item}
value={item}
key={index}
/>
);
})}
</Picker>
<TouchableOpacity
style={{
...styles.openButton,
backgroundColor: "pink",
marginTop: 45,
}}
onPress={() => {
setNewCategory(picked);
setPicker(false);
}}
>
<Text style={styles.textStyle}>Guardar</Text>
</TouchableOpacity>
</View>
</View>
</Modal>
<SearchableDropdown
onTextChange={(text) => console.log(text)}
onItemSelect={(item) => alert(JSON.stringify(item))}
containerStyle={{ padding: 5 }}
textInputStyle={{
padding: 12,
borderWidth: 1,
borderColor: "#ccc",
backgroundColor: "#FAF7F6",
}}
itemStyle={{
padding: 10,
marginTop: 2,
backgroundColor: "#FAF9F8",
borderColor: "#bbb",
borderWidth: 1,
}}
itemTextStyle={{
color: "#222",
}}
itemsContainerStyle={{
maxHeight: "60%",
}}
items={items}
defaultIndex={1}
placeholder="Elige un producto"
resetValue={false}
underlineColorAndroid="transparent"
/>