import React, { useState } from "react"; import { View, Text, TouchableOpacity, StyleSheet, ScrollView, } from "react-native"; import { Ionicons, MaterialIcons } from "@expo/vector-icons"; // Importing icons const MetodeDonasi = ({ navigation }) => { const [selectedPayment, setSelectedPayment] = useState(null); // Handle Payment Method Selection const handlePaymentSelection = (method) => { setSelectedPayment(method); }; return ( {/* Header with Back Button */} navigation.goBack()} > DONASI {/* Metode Pembayaran */} Metode Pembayaran handlePaymentSelection("Dana")} > Transfer DANA handlePaymentSelection("Transfer")} > Transfer Bank {/* Button Selanjutnya */} alert("Pilih metode pembayaran")} onPress={() => navigation.navigate("KonfirmasiPembayaran")} > Selanjutnya ); }; const styles = StyleSheet.create({ container: { flex: 1, padding: 20, backgroundColor: "#f9f9f9", }, header: { flexDirection: "row", alignItems: "center", marginBottom: 20, marginTop: 30, }, backButton: { marginRight: 10, }, title: { fontSize: 22, fontWeight: "bold", color: "#333", }, paymentMethodSection: { marginBottom: 30, }, sectionTitle: { fontSize: 18, fontWeight: "bold", color: "#333", marginBottom: 15, }, paymentButtonContainer: { flexDirection: "row", gap: 15, marginBottom: 30, }, paymentButton: { flex: 1, borderWidth: 1, borderColor: "#ddd", paddingVertical: 15, borderRadius: 8, backgroundColor: "#fff", alignItems: "center", justifyContent: "center", }, selectedPaymentButton: { borderColor: "#2D572C", backgroundColor: "#e0f7e0", }, paymentButtonContent: { flexDirection: "row", alignItems: "center", justifyContent: "center", gap: 10, }, paymentText: { fontSize: 16, color: "#333", }, selectedPaymentText: { fontSize: 16, color: "#2D572C", }, nextButton: { backgroundColor: "#2D572C", paddingVertical: 15, borderRadius: 8, alignItems: "center", }, nextButtonText: { color: "#fff", fontSize: 16, fontWeight: "bold", }, }); export default MetodeDonasi;