diff --git a/src/App.js b/src/App.js index 87963f4..9ceaa59 100644 --- a/src/App.js +++ b/src/App.js @@ -15,26 +15,28 @@ import VodProductDesign from "./components/vodProductDesign/VodProductDesign"; 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"; function App() { return (
- - - - - - - - - - - - - + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} {/* */} + {/* */}
); } diff --git a/src/components/Design2D/Design2D.js b/src/components/Design2D/Design2D.js new file mode 100644 index 0000000..58bb9b4 --- /dev/null +++ b/src/components/Design2D/Design2D.js @@ -0,0 +1,44 @@ +import React from "react"; + +const Design2D = ({ array }) => { + return ( +
+ {array.map((item, index) => ( +
+ {item.items.map((item1, index) => ( +
+ ))} +
+ ))} +
+ ); +}; + +export default Design2D; + +Design2D.defaultProps = { + array: [ + { + flex: 6, + items: [{ bg: "bg-red-500", flex: 1 }], + }, + { + flex: 4, + items: [{ bg: "bg-green-500", flex: 1 }], + }, + { + flex: 2, + items: [ + { bg: "bg-blue-500", flex: 1 }, + { bg: "bg-yellow-500", flex: 1 }, + ], + }, + ], +}; diff --git a/src/components/productDesign/ProductDesign.js b/src/components/productDesign/ProductDesign.js index f998f88..89ac7f4 100644 --- a/src/components/productDesign/ProductDesign.js +++ b/src/components/productDesign/ProductDesign.js @@ -1,5 +1,3 @@ -import React, { useState } from "react"; - import "./ProductDesign.scss"; import StarRating from "../starRating/StarRating"; @@ -41,8 +39,6 @@ const ProductDesign = ({ rangeWidth, addToCartHolder, }) => { - const [isHovering, setIsHovering] = useState(false); - return (
{/* title holder */} @@ -90,7 +86,7 @@ const ProductDesign = ({ className={`w-full sm:w-60 md:w-72 mx-1 rounded-lg shadow-sm p-2 my-3 ${productHolderBorder} ${productHolderBorderColor}`} > {/* product image */} -
+
{/* icons on image */}
{discountPricePercent && ( @@ -112,14 +108,12 @@ const ProductDesign = ({ )}
{/* img */} -
+
{verticalImg && ( setIsHovering(true)} - onMouseLeave={() => setIsHovering(false)} /> )} {horizontalImg && ( @@ -159,25 +153,21 @@ const ProductDesign = ({
)} -
- -
+
{/* product content */}

نسخه چاپی علموم تجربه هفتم

{productContent && (

این کتاب شامل گلدان و گیاه و خاک می باشد و همچنین آپشن های خوب دیگری نیز دارد. @@ -226,7 +216,7 @@ const ProductDesign = ({ {/* add to cart */} {addToCartHolder && (

); }; - +// hover:-translate-y-2 export default VodProductDesign; // text colors i used for product title: