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.
 
 
 
 
 

109 lines
3.4 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 = ({ question }) => {
return (
<View style={[tw("flex flex-col mb-3")]}>
<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: "#ECFDFF",
},
]}
>
<Text
style={[
{
fontSize: fontSize.base,
color: "#275077",
fontFamily: "regular",
},
]}
>
{question.title}
</Text>
</View>
<Text
style={{
fontSize: fontSize.base,
fontFamily: "light",
color: "#275077",
}}
>
{question.text}
</Text>
<View style={[tw("flex flex-row justify-between mt-4")]}>
{question.images.map((image, index) => (
<View
style={[
tw("rounded-md flex flex-row justify-center items-center"),
{
width: width / 2 - 24,
height: width / 2 - 24,
backgroundColor: "#F6F6F6",
},
]}
>
<Text>Pic</Text>
</View>
))}
</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-2"
),
{
backgroundColor: "#50A9FF33",
},
]}
>
<Text
style={[
{
fontSize: fontSize.base,
color: "#275077",
fontFamily: "regular",
},
]}
>
نقد بررسی و توضیحات تکمیلی محصول
</Text>
</View>
<ScrollView style={tw("flex-1")}>
{list?.map((question, index) => (
<Property question={question} key={index} />
))}
</ScrollView>
</View>
);
};
export default ProductReviews;
ProductReviews.defaultProps = {
list: [
{
title: "آیا ارزش خرید دارد یا خیر؟",
text: "هر نفسی که فرو می بریم، مرگی را که مدام به ما دست اندازی میکند پس میزند... در نهایت این مرگ است که باید پیروز شود، زیرا از هنگام تولد بخشی از سرنوشت ما شده و فقط مدت کوتاهی پیش از بلعیدن طعمه اش، با آن بازی می کند. با این همه، ما تا آنجا که ممکن است، با علاقه فراوان و دلواپسی زیاد به زندگی ادامه می دهیم، همان طور که تا آنجا که ممکن است طولانی تر در یک حباب صابون می دمیم تا بزرگتر شود، گر چه با قطعیتی تمام می دانیم که خواهد ترکید و ",
images: [0, 1],
},
],
};