From a3833a74a4059932c9f57ebfd968736e01b244ee Mon Sep 17 00:00:00 2001 From: Pkpedram Date: Wed, 26 Jan 2022 18:23:49 +0330 Subject: [PATCH] Product Description Version 1.0.0 Pushed --- src/components/ProductDescription/index.js | 111 +++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 src/components/ProductDescription/index.js diff --git a/src/components/ProductDescription/index.js b/src/components/ProductDescription/index.js new file mode 100644 index 0000000..aa11d56 --- /dev/null +++ b/src/components/ProductDescription/index.js @@ -0,0 +1,111 @@ +import React from "react"; + +const ProductDescription = ({ + navTitles, + items, + addToCart +}) =>{ + return( + <> +
+ +
+
+
+ {items.map(e => ( + + e.items.map(item => ( +
    +
  • {item.title}
  • +
  • {item.description}
  • +
+ )) + + + ))} +
+
+ {addToCart} +
+ +
+ + ); +}; + + + + + +export default ProductDescription; + + + + +ProductDescription.defaultProps = { + navTitles: [ + { + id: 0, + title: 'مشخصات', + isActive: true, + name: 'moshakhasat' + }, + { + id: 1, + title: 'نقد و بررسی', + isActive: false + }, + { + id: 2, + title: 'برسش و باسخ', + isActive:false + }, + ], + items: [ + { + name: 'moshakhasat', + items: [ + { + title : 'وزن کتاب', + description: '۱ کیلوگرم' + }, + { + title : 'تعداد صفحات', + description: '400 صفحه' + }, + { + title : 'نوع کاغذ', + description: 'گلاسه' + }, + { + title : 'شماره شابک', + description: '1225548218000005818765' + }, + { + title : 'انتشارات', + description: 'رزمندگان' + }, + { + title : 'نویسنده و یا معلف', + description: 'یک نویسنده گمنام' + }, + { + title : 'قطع', + description: 'خشتی' + }, + { + title : 'سال انتشار', + description: '1399' + }, + ] + } + ] + +} \ No newline at end of file