-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAutocompleteSuggestion.js
More file actions
43 lines (39 loc) · 896 Bytes
/
AutocompleteSuggestion.js
File metadata and controls
43 lines (39 loc) · 896 Bytes
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
import React, { Component } from "react";
import { StyleSheet, Text, TouchableOpacity } from "react-native";
const COLORCOLORS = {
W: "#FFF9D6",
U: "#5EBEFF",
B: "#000000",
R: "#FF0000",
G: "#1FAA00"
};
export default class AutocompleteSuggestion extends Component {
constructor(props) {
super(props);
this.state = {
callback: props.callback,
cardName: props.cardName
};
}
render() {
return (
<TouchableOpacity onPress={() => this.state.callback()}>
<Text style={styles.cardCompleteSuggestion}>
{this.state.cardName}
</Text>
</TouchableOpacity>
);
}
}
const styles = StyleSheet.create({
cardCompleteSuggestion: {
backgroundColor: "#AAAAFF",
borderWidth: 1,
borderRadius: 7,
borderColor: "#AAAAFF",
color: "#000000",
margin: 1,
fontSize: 17,
paddingHorizontal: 3
}
});