diff --git a/src/components/Banners/index.js b/src/components/Banners/index.js index 2906e46..12305a9 100644 --- a/src/components/Banners/index.js +++ b/src/components/Banners/index.js @@ -8,7 +8,7 @@ const Banners = ({ }) => { return (
{ + return ( +
+ {array.map((item, index) => ( +
+ {item.items.map((item1, index) => ( +
+
+ {/*

inside div

*/} + {/* */} +
+
+ ))} +
+ ))} +
+ ); +}; + +export default Design2D; + +Design2D.defaultProps = { + array: [ + { + flex: 5, + items: [{ bg: "bg-red-500", flex: 1 }], + }, + { + flex: 3, + items: [ + { bg: "bg-blue-500", flex: 1 }, + { bg: "bg-yellow-500", flex: 1 }, + ], + }, + { + flex: 3, + items: [{ bg: "bg-green-500", flex: 1 }], + }, + + ], +}; diff --git a/src/views/Home/Desktop/index.js b/src/views/Home/Desktop/index.js index 6620c23..575b805 100644 --- a/src/views/Home/Desktop/index.js +++ b/src/views/Home/Desktop/index.js @@ -10,6 +10,7 @@ import { book, publicApi } from "../../../redux/actions"; import Part2 from "./Part2"; import HomeImg from '../../../assets/images/HomeImg.svg'; import Part4 from "./Part4"; +import Design2D from "../../../components/Design2D"; const DesktopHome = ( { @@ -18,17 +19,48 @@ const DesktopHome = ( } ) =>{ - +const banners = [ + { + flex: 4, + items: [{ bg:'', + flex: 1, + image: 'https://dkstatics-public.digikala.com/digikala-adservice-banners/d2a56a4a0c3ce4645bf0b405b0bbf3a29da1cbd3_1642861192.jpg' + }], + }, + { + flex: 2, + items: [ + { bg:'', + flex: 1, + image: 'https://dkstatics-public.digikala.com/digikala-adservice-banners/e13aefeda2d3b44db78a92aac9cdc82a9b1650e9_1632230372.jpg?' + }, + { bg:'', + flex: 1, + image: 'https://dkstatics-public.digikala.com/digikala-adservice-banners/fe8f275f4e4b5e6eb2f66cf65f3895398e049b40_1625578273.jpg' + }, + ], + }, + { + flex: 2, + items: [{ bg:'', + flex: 1, + image: 'https://dkstatics-public.digikala.com/digikala-adservice-banners/54d75e08cb0a72920ac3b2338232bf5ca70ccc74_1641638418.jpg' + }], + }, +] return (
- + /> */} +
+ +