Skip to content

Commit 2e73061

Browse files
committed
initial
1 parent 1d418db commit 2e73061

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

Components/Detail.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import { View, StyleSheet, Text } from "react-native";
2+
import { View, StyleSheet, Text, TouchableOpacity, Alert } from "react-native";
33
import Icon from "react-native-vector-icons/Feather";
44

55
export const Detail = ({ label, data }) => {
@@ -8,7 +8,9 @@ export const Detail = ({ label, data }) => {
88
<Text style={styles.label}>{label}</Text>
99
<View style={styles.info}>
1010
<Text>{data}</Text>
11-
<Icon name="info" color="#1983ff" size={20} style={styles.icon} />
11+
<TouchableOpacity onPress={() => Alert.alert("Additional info")}>
12+
<Icon name="info" color="#1983ff" size={20} style={styles.icon} />
13+
</TouchableOpacity>
1214
</View>
1315
</View>
1416
);

Screens/DetailsScreen.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import { Divider } from "react-native-elements";
3-
import { View, StyleSheet, Text } from "react-native";
43
import Icon from "react-native-vector-icons/Feather";
4+
import { View, StyleSheet, Text, TouchableOpacity, Alert } from "react-native";
55

66
import { Detail } from "../Components/Detail";
77

@@ -11,14 +11,20 @@ export const DetailsScreen = ({ route }) => {
1111
<View style={styles.container}>
1212
<Text style={styles.amount}>${item.amount}</Text>
1313
<View style={styles.buttons}>
14-
<View style={styles.button}>
14+
<TouchableOpacity
15+
style={styles.button}
16+
onPress={() => Alert.alert("Card details")}
17+
>
1518
<Icon name="credit-card" size={18} color="#000" />
1619
<Text style={styles.btnText}>Card</Text>
17-
</View>
18-
<View style={styles.button}>
20+
</TouchableOpacity>
21+
<TouchableOpacity
22+
style={styles.button}
23+
onPress={() => Alert.alert("Debt details")}
24+
>
1925
<Icon name="dollar-sign" size={18} color="#000" />
2026
<Text style={styles.btnText}>Debt</Text>
21-
</View>
27+
</TouchableOpacity>
2228
</View>
2329
<Text style={styles.details}>Transaction Details</Text>
2430
<Divider />

0 commit comments

Comments
 (0)