You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

110 lines
2.7 KiB

import { View, Text, ScrollView, Dimensions } from "react-native";
import React from "react";
import fontSize from "../../constants/fontSize";
import tw from "tailwind-rn";
const { width } = Dimensions.get("window");
const ProductReviews = ({ list }) => {
const Property = ({ prop }) => {
return (
<View style={[tw("flex flex-row-reverse mb-3")]}>
<View
style={[
tw("rounded-md rounded-md"),
{ backgroundColor: "#f8f8f8", width: width / 3.5 },
]}
>
<Text
style={[
tw("py-3 pr-2"),
{
fontFamily: "regular",
fontSize: fontSize.base,
color: "#07AFAF",
},
]}
>
{persian[prop]}
</Text>
</View>
<View
style={[
tw("flex-1 mr-2 rounded-md px-2 py-3"),
{ backgroundColor: "#f8f8f8" },
]}
>
<Text
style={[
tw("text-right"),
{
fontFamily: "regular",
fontSize: fontSize.sm,
color: "#646464",
},
]}
>
{list[prop]}
</Text>
</View>
</View>
);
};
return (
<View style={{ flex: 1, paddingHorizontal: 16 }}>
<View
onPress={() => refRBSheet.current.open()}
style={[
tw(
"flex flex-row-reverse justify-between items-center mt-3 rounded-md px-2 py-3 mb-4"
),
{
backgroundColor: "#50A9FF33",
},
]}
>
<Text
style={[
{
fontSize: fontSize.base,
color: "#275077",
fontFamily: "regular",
},
]}
>
مشخصات محصول
</Text>
</View>
<ScrollView style={tw("flex-1")}>
{Object?.keys(list)?.map((prop, index) => (
<Property prop={prop} key={index} />
))}
</ScrollView>
</View>
);
};
export default ProductReviews;
ProductReviews.defaultProps = {
list: {
display: "IPS LCD 4K Samsung backlight",
weight: "2 کیلوگرم",
proccessor: "Intel core I7 11700H",
graphic: "Nvidia 3090TI 6GB",
audio: "Sonic master",
keyboard: "جزیره ای",
accessories: "کیف + کابل تبدیل برق شهری",
},
};
const persian = {
display: "صفحه نمایش",
weight: "وزن",
proccessor: "پردازنده",
graphic: "پردازنده گرافیکی",
audio: "کارت صدا",
keyboard: "کیبرد",
accessories: "متعلقات جعبه",
};