From 83f2339a1716beba2653088b8fc92eee2561e4f2 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Fri, 9 Jun 2023 21:09:57 -0400 Subject: [PATCH] top sliders --- src/components/UserHeader/CommonHead.jsx | 16 +- .../UserHeader/RecomendedSliders.jsx | 254 ++++++++++++++++++ src/index.css | 6 + 3 files changed, 269 insertions(+), 7 deletions(-) create mode 100644 src/components/UserHeader/RecomendedSliders.jsx diff --git a/src/components/UserHeader/CommonHead.jsx b/src/components/UserHeader/CommonHead.jsx index 2426423..4865bdc 100644 --- a/src/components/UserHeader/CommonHead.jsx +++ b/src/components/UserHeader/CommonHead.jsx @@ -1,22 +1,24 @@ import React from "react"; import { Link } from "react-router-dom"; +import RecomendedSliders from "./RecomendedSliders"; export default function CommonHead({ className,commonHeadData }) { const vvv= commonHeadData(); console.log("UUUUUUUU-",vvv); return (
-

- This is common head which will appear as needed , will take many shape -

-

- some space for extra texts here -

+ {/*

*/} + {/* This is common head which will appear as needed , will take many shape*/} + {/*

*/} + {/*

*/} + {/* some space for extra texts here*/} + {/*

*/} +
diff --git a/src/components/UserHeader/RecomendedSliders.jsx b/src/components/UserHeader/RecomendedSliders.jsx new file mode 100644 index 0000000..3f99d00 --- /dev/null +++ b/src/components/UserHeader/RecomendedSliders.jsx @@ -0,0 +1,254 @@ +import React, { useRef } from "react"; +import top from "../../assets/images/top-buyer-1png.png"; +import top2 from "../../assets/images/top-buyer-2.png"; +import top3 from "../../assets/images/top-buyer-3.png"; +import top4 from "../../assets/images/top-buyer-4.png"; +import Icons from "../Helpers/Icons"; +import SliderCom from "../Helpers/SliderCom"; + +export default function RecomendedSliders({ className }) { + const settings = { + arrows: false, + dots: false, + infinite: true, + autoplay: true, + slidesToShow: 4, + slidesToScroll: 1, + responsive: [ + { + breakpoint: 426, + settings: { + slidesToShow: 2, + slidesToScroll: 1, + }, + }, + ], + }; + const sellSlider = useRef(null); + const buySlider = useRef(null); + const prevHandler = (value) => { + if (value === "sell") { + sellSlider.current.slickPrev(); + } + if (value === "buy") { + buySlider.current.slickPrev(); + } + }; + const nextHandler = (value) => { + if (value === "sell") { + sellSlider.current.slickNext(); + } + if (value === "buy") { + buySlider.current.slickNext(); + } + }; + return ( + <> + {/*
*/} + {/*

*/} + {/* Top Seller*/} + {/*

*/} + {/*
*/} + {/* nextHandler("sell")}*/} + {/* type="button"*/} + {/* className="transform rotate-180 text-dark-gray dark:text-white dark:opacity-25"*/} + {/* >*/} + {/* */} + {/* */} + {/* prevHandler("sell")}*/} + {/* type="button"*/} + {/* className="transform rotate-180"*/} + {/* >*/} + {/*
*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/*
*/} + {/* */} + {/*
*/} + {/*
*/} +
+ +
+ {/* title */} +
+

+ This is short title +

+
+ {/* username */} +
+

+ Some wondersull text here and more +

+
+ {/* items */} +
+
+ (button) +
+
+
+ +
+ {/* title */} +
+

+ This is short title +

+
+ {/* username */} +
+

+ Some wondersull text here and more +

+
+ {/* items */} +
+
+ (button) +
+
+
+ + +
+ {/* title */} +
+

+ This is short title +

+
+ {/* username */} +
+

+ Some wondersull text here and more +

+
+ {/* items */} +
+
+ (button) +
+
+
+ + +
+ {/* title */} +
+

+ This is short title +

+
+ {/* username */} +
+

+ Some wondersull text here and more +

+
+ {/* items */} +
+
+ (button) +
+
+
+ + +
+ {/* title */} +
+

+ This is short title +

+
+ {/* username */} +
+

+ Some wondersull text here and more +

+
+ {/* items */} +
+
+ (button) +
+
+
+ +
+ {/* title */} +
+

+ This is short title +

+
+ {/* username */} +
+

+ Some wondersull text here and more +

+
+ {/* items */} +
+
+ (button) +
+
+
+ +
+ {/* title */} +
+

+ This is short title +

+
+ {/* username */} +
+

+ Some wondersull text here and more +

+
+ {/* items */} +
+
+ (button) +
+
+
+ +
+
+ + ); +} diff --git a/src/index.css b/src/index.css index 41f66de..75b3d78 100644 --- a/src/index.css +++ b/src/index.css @@ -34,6 +34,12 @@ width: 100%; text-align: center; } +.commonHeaderSliderItem{ + background-color: aliceblue; + border-radius: 10px; + margin: 0px 5px 0px 5px; + height: 95px; +} .offer-slide-item{ background: rgb(2,0,36); background: radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(3,51,2,0.782125350140056) 0%, rgba(0,212,255,0.07904411764705888) 0%, rgba(153,182,201,1) 99%);