From b36ae9e888909a7645404b6e3f48bf1d0f497526 Mon Sep 17 00:00:00 2001 From: mahdi Date: Mon, 9 May 2022 12:48:07 +0430 Subject: [PATCH] update 3 files and delete 1 file --- public/images/delivery-icon.svg | 11 +++ public/images/shield-tick.svg | 5 + public/images/tick-circle.svg | 5 + src/components/AddToCart/index.js | 68 ++++++++++++++ src/components/Advertisement/design2/index.js | 2 +- .../Advertisements/Design1/index.js | 47 ++++++++++ .../Advertisements/Design2/index.js | 55 +++++++++++ .../Advertisements/Design3/cart-icon.svg | 10 ++ .../Advertisements/Design3/index.js | 91 +++++++++++++++++++ .../Advertisements/Design3/map-icon.svg | 8 ++ .../Advertisements/Design3/setting-icon.svg | 5 + src/components/Advertisements/index.js | 29 ++++++ .../Design2D/{Design2D.js => index.js} | 6 +- src/redux/data.js | 63 ++++++++++++- 14 files changed, 397 insertions(+), 8 deletions(-) create mode 100644 public/images/delivery-icon.svg create mode 100644 public/images/shield-tick.svg create mode 100644 public/images/tick-circle.svg create mode 100644 src/components/AddToCart/index.js create mode 100644 src/components/Advertisements/Design1/index.js create mode 100644 src/components/Advertisements/Design2/index.js create mode 100644 src/components/Advertisements/Design3/cart-icon.svg create mode 100644 src/components/Advertisements/Design3/index.js create mode 100644 src/components/Advertisements/Design3/map-icon.svg create mode 100644 src/components/Advertisements/Design3/setting-icon.svg create mode 100644 src/components/Advertisements/index.js rename src/components/Design2D/{Design2D.js => index.js} (80%) diff --git a/public/images/delivery-icon.svg b/public/images/delivery-icon.svg new file mode 100644 index 0000000..e4cc601 --- /dev/null +++ b/public/images/delivery-icon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/images/shield-tick.svg b/public/images/shield-tick.svg new file mode 100644 index 0000000..fd2e0f8 --- /dev/null +++ b/public/images/shield-tick.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/tick-circle.svg b/public/images/tick-circle.svg new file mode 100644 index 0000000..d969ba7 --- /dev/null +++ b/public/images/tick-circle.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/AddToCart/index.js b/src/components/AddToCart/index.js new file mode 100644 index 0000000..12493f7 --- /dev/null +++ b/src/components/AddToCart/index.js @@ -0,0 +1,68 @@ +import React from "react"; + +const AddToCartCard = ({ + numberOfSuggest, + sendingTime, + button, + price, + profit, + showProduct, + productName, + productImg, + productCat, +}) => { + const specialities = [ + { + icon: "images/tick-circle.svg", + description: ` توصیه به خرید توسط ${numberOfSuggest} نفر`, + }, + { + icon: "images/shield-tick.svg", + description: `زمان ارسال ${sendingTime} روز کاری پس از سفارش`, + }, + { + icon: "images/delivery-icon.svg", + description: `گارانتی اصالت و سلامت فیزیکی`, + }, + ]; + return ( +
+ {showProduct && ( +
+ productImage +
+

{productName}

+

{productCat}

+
+
+ )} + {specialities.map((item, index) => ( +
+ {item.icon && } +

{item.description}

+
+ ))} +
+

+ {price} + تومان +

+ {profit && ( +
+ با خرید این کالا {profit} تومان سود کنید +
+ )} +
+
{button}
+
+ ); +}; + +export default AddToCartCard; diff --git a/src/components/Advertisement/design2/index.js b/src/components/Advertisement/design2/index.js index b6be859..67f57a3 100644 --- a/src/components/Advertisement/design2/index.js +++ b/src/components/Advertisement/design2/index.js @@ -2,7 +2,7 @@ import React from "react"; const AdvertisementDesign2 = () => { return ( -
+
{ + return ( +
+
+
+
+
+

تبلیغات دانوینی

+

+ لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده + از طراحان گرافیک است. +

+
+ +
+ ); +}; + +export default AdvertisementDesign1; diff --git a/src/components/Advertisements/Design2/index.js b/src/components/Advertisements/Design2/index.js new file mode 100644 index 0000000..b6be859 --- /dev/null +++ b/src/components/Advertisements/Design2/index.js @@ -0,0 +1,55 @@ +import React from "react"; + +const AdvertisementDesign2 = () => { + return ( +
+
+
+

تبلیغات دانوینی

+

+ لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با + استفاده از طراحان گرافیک است. +

+ +
+
+
+
+
+
+ ); +}; + +export default AdvertisementDesign2; diff --git a/src/components/Advertisements/Design3/cart-icon.svg b/src/components/Advertisements/Design3/cart-icon.svg new file mode 100644 index 0000000..d411410 --- /dev/null +++ b/src/components/Advertisements/Design3/cart-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/components/Advertisements/Design3/index.js b/src/components/Advertisements/Design3/index.js new file mode 100644 index 0000000..890dfa7 --- /dev/null +++ b/src/components/Advertisements/Design3/index.js @@ -0,0 +1,91 @@ +import React from "react"; + +import cart from "./cart-icon.svg"; +import map from "./map-icon.svg"; +import setting from "./setting-icon.svg"; + +const AdvertisementDesign3 = ({ features }) => { + return ( +
+
+
+

تبلیغات دانوینی

+

+ لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با + استفاده از طراحان گرافیک است. +

+
+ {features.map((feature, i) => ( +
+ +

+ {feature.title} +

+
+ ))} +
+
+
+
+
+
+ + +
+
+
+ ); +}; + +export default AdvertisementDesign3; + +AdvertisementDesign3.defaultProps = { + features: [ + { + icon: cart, + title: "قابلیت های فروشگاهی بسیار پیشرفته و ساده", + }, + { + icon: map, + title: "ارسال به تمام نقاط ایران", + }, + { + icon: setting, + title: "تنظیمات پیشرفته و بیش از 2000 ماژول اختصاصی", + }, + ], +}; diff --git a/src/components/Advertisements/Design3/map-icon.svg b/src/components/Advertisements/Design3/map-icon.svg new file mode 100644 index 0000000..afd0bbc --- /dev/null +++ b/src/components/Advertisements/Design3/map-icon.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/components/Advertisements/Design3/setting-icon.svg b/src/components/Advertisements/Design3/setting-icon.svg new file mode 100644 index 0000000..8bbf82c --- /dev/null +++ b/src/components/Advertisements/Design3/setting-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/Advertisements/index.js b/src/components/Advertisements/index.js new file mode 100644 index 0000000..5e4f0dc --- /dev/null +++ b/src/components/Advertisements/index.js @@ -0,0 +1,29 @@ +import React, { useState } from "react"; + +import Design1 from "./Design1"; +import Design2 from "./Design2"; +import Design3 from "./Design3"; + +function Blogs() { + const list = { + 1: , + 2: , + 3: , + }; + const [type, setType] = useState(1); + return ( +
+ + {list[type]} +
+ ); +} + +export default Blogs; diff --git a/src/components/Design2D/Design2D.js b/src/components/Design2D/index.js similarity index 80% rename from src/components/Design2D/Design2D.js rename to src/components/Design2D/index.js index d18c8b6..e8c29af 100644 --- a/src/components/Design2D/Design2D.js +++ b/src/components/Design2D/index.js @@ -2,10 +2,10 @@ import React from "react"; const Design2D = ({ array }) => { return ( -
+
{array.map((item, index) => (
@@ -15,7 +15,7 @@ const Design2D = ({ array }) => { style={{ flex: item1.flex }} key={index} > -
+

inside div

diff --git a/src/redux/data.js b/src/redux/data.js index 16bf770..33b44c0 100644 --- a/src/redux/data.js +++ b/src/redux/data.js @@ -1,3 +1,12 @@ +import ButtonDivTag from "../components/ButtonDivTag"; +import Button from "../components/Button"; +import Design2D from "../components/Design2D"; +import AddToCartCard from "../components/AddToCart"; +import Advertisements from "../components/Advertisements"; + +import AdvertisementDesign1 from "../components/Advertisement/design1"; +import AdvertisementDesign2 from "../components/Advertisement/design2"; + // import ButtonDesign from "./components/buttonDesign/ButtonDesign"; // import ProductDesign from "./components/productDesign/ProductDesign"; // import ProductTags from "./components/productTags/ProductTags"; @@ -14,7 +23,6 @@ // import ContactInfoSection from "./components/contactInfoSection/ContactInfoSection"; // import FooterDesign1 from "./components/footer/design1/FooterDesign1"; // import Testttt from "./components/testtttt/Testttt"; -// import Design2D from "./components/Design2D/Design2D"; // import Features from "./components/Features/index"; // import Feedback from "./components/Feedback/index"; // import Alert from "./components/Alert"; @@ -74,9 +82,6 @@ // import CustomToast from "./components/CustomToast"; // import IconText from "./components/IconText"; // import CardDesign2 from "./components/CardDesign2"; -import ButtonDivTag from "../components/ButtonDivTag"; -import Button from "../components/Button"; - // import LeafletMap from "./components/LeafletMap"; // import TestComponentNew from "./components/TestComponentNew"; // import DateRangePicker from "./components/DateRangePicker"; @@ -114,6 +119,56 @@ const components = [ code: null, }, }, + { + name: "2D Design", + author: "Andalib", + props: [], + content: { + name: "2D Design", + component: , + code: null, + }, + }, + { + name: "AddToCartCard", + author: "Keshavarzi", + props: [], + content: { + name: "AddToCartCard OR Product Status Card", + component: , + code: null, + }, + }, + { + name: "Advertisements", + author: "Andalib", + props: [], + content: { + name: "Advertisements", + component: , + code: null, + }, + }, + { + name: "Advertisement", + author: "Andalib", + props: [], + content: { + name: "Design1", + component: , + code: null, + }, + }, + { + name: "Advertisement", + author: "Andalib", + props: [], + content: { + name: "Design2", + component: , + code: null, + }, + }, ]; export default components;