import React, { useState } from "react"; import { View, Text, ScrollView, TouchableOpacity, Image, StyleSheet, Dimensions, TextInput, } from "react-native"; import PopupBuildpc from "@components/buildpc/PopupBuildpc"; // Bạn cần tự tạo modal này trong React Native import Feather from "@expo/vector-icons/Feather"; import AntDesign from "@expo/vector-icons/AntDesign"; const { width } = Dimensions.get("window"); export function CreateBuildpc() { const [showPopup, setShowPopup] = useState(false); return ( {/* Item CPU */} CPU AMD Ryzen 7 9800x3D 4.7 GHz 8-Core Processor Số lượng Giá bán: 4.700.000 Vnđ Khuyến mãi: 20% Thành tiền: 4.000.000đ Nhà cung cấp {/* Thêm lựa chọn CPU */} setShowPopup(true)} > + Chọn thêm CPU {/* Tổng tiền */} Tổng tiền 2 sản phẩm: 8.000.000đ 🖨️ In đơn hàng Mua hàng tại Hacom {/* Popup */} {showPopup && ( setShowPopup(false)} /> )} ); } export default CreateBuildpc; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: "#fff", }, componentTitle: { fontWeight: "bold", fontSize: 15, marginBottom: 5, }, itemRow: { paddingVertical: 12, borderBottomWidth: 1, borderColor: "#ccc", }, productInfo: { flexDirection: "row", alignItems: "flex-start", justifyContent: "space-between", }, productLeft: { width: width - 100, }, infolinhkien: { flexDirection: "row", }, productImage: { width: 60, height: 60, marginRight: 10, borderWidth: 1, borderColor: "#ccc", }, productName: { flexShrink: 1, }, inputQl: { borderWidth: 1, borderColor: "#e3e3e3", fontSize: 13, width: 64, height: 30, marginLeft: 10, paddingVertical: 0, paddingHorizontal: 6, borderRadius: 4, paddingLeft: 10, paddingRight: 10, lineHeight: 20, includeFontPadding: false, }, boxQlt: { marginBottom: 15, marginTop: 10, flexDirection: "row", alignItems: "center", height: 30, flex: 1, }, oldPrice: {}, discount: {}, totalPrice: { fontWeight: "bold", color: "red", }, supplierSection: { alignItems: "center", flexDirection: "row", }, supplierLogo: { width: 60, height: 30, marginBottom: 6, }, buttonGroup: { flexDirection: "row", alignItems: "center", width: 60, }, buyButton: { marginRight: 6, }, removeButton: { paddingVertical: 2, }, addButton: { marginTop: 12, backgroundColor: "#d4d4d4", borderRadius: 4, paddingVertical: 6, alignItems: "center", }, addButtonText: { fontSize: 12, fontWeight: "bold", }, totalSection: { marginTop: 24, }, totalText: { fontSize: 18, fontWeight: "bold", color: "#dc2626", textAlign: "right", }, totalButtons: { flexDirection: "row", justifyContent: "flex-end", marginTop: 12, }, printButton: { borderWidth: 1, borderColor: "#b3b3b3", paddingHorizontal: 16, paddingVertical: 8, marginRight: 10, borderRadius: 4, }, checkoutButton: { backgroundColor: "#5b21b6", paddingHorizontal: 16, paddingVertical: 8, borderRadius: 4, }, checkoutText: { color: "#fff", fontWeight: "bold", }, });