From 3d760b58f398af21c6b6584a2095875d82495008 Mon Sep 17 00:00:00 2001 From: innovatixhub Date: Tue, 26 Nov 2024 03:10:43 -0800 Subject: [PATCH] Add files via upload --- .../thismonthsection/ThisMonthSection.jsx | 37 ++++++++++++ .../ThisMonthSection.module.scss | 57 +++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 src/componants/home/thismonthsection/ThisMonthSection.jsx create mode 100644 src/componants/home/thismonthsection/ThisMonthSection.module.scss diff --git a/src/componants/home/thismonthsection/ThisMonthSection.jsx b/src/componants/home/thismonthsection/ThisMonthSection.jsx new file mode 100644 index 0000000..cef139a --- /dev/null +++ b/src/componants/home/thismonthsection/ThisMonthSection.jsx @@ -0,0 +1,37 @@ +import { useTranslation } from "react-i18next"; +import { Link } from "react-router-dom"; +import { productsData } from "src/Data/productsData"; +import ProductsSlider from "../../Shared/MidComponents/ProductsSlider/ProductsSlider"; +import SectionTitle from "../../Shared/MiniComponents/SectionTitle/SectionTitle"; +import s from "./ThisMonthSection.module.scss"; + +const ThisMonthSection = () => { + const { t } = useTranslation(); + const thisMonthSection = "sectionTitles.thisMonthSection"; + + return ( +
+
+ + + + {t("buttons.viewAll")} + +
+ + +
+ ); +}; +export default ThisMonthSection; + +function filterThisMonthProducts() { + const filteredProducts = productsData.filter( + (productData) => productData.sold > 1000 + ); + + return filteredProducts; +} diff --git a/src/componants/home/thismonthsection/ThisMonthSection.module.scss b/src/componants/home/thismonthsection/ThisMonthSection.module.scss new file mode 100644 index 0000000..4d05ccd --- /dev/null +++ b/src/componants/home/thismonthsection/ThisMonthSection.module.scss @@ -0,0 +1,57 @@ +@import "src/Styles/mixins"; + +.thisMonthSection { + margin-bottom: 170px; +} + +@include small { + .thisMonthSection { + margin-bottom: 100px; + } +} + +.wrapper { + display: flex; + justify-content: space-between; + align-items: flex-end; + gap: 30px; + margin-bottom: 20px; +} + +@include small { + .wrapper { + flex-direction: column; + align-items: flex-start; + } +} + +.viewAllBtn { + -webkit-tap-highlight-color: transparent; + border: none; + outline: none; + cursor: pointer; + width: fit-content; + height: fit-content; + background: var(--dark-red); + color: var(--white); + padding: 12px 48px; + border-radius: 4px; + letter-spacing: 0em; + font-weight: 500; + text-wrap: nowrap; + outline: solid 2px transparent; + outline-offset: -2px; + transition: background .2s; + + &:focus-visible { + transition: var(--outline-transition); + outline-color: var(--tomato); + color: var(--very-dark-gray); + background: transparent; + color: var(--tomato); + } + + &:not(:focus-visible):hover { + background: var(--tomato); + } +} \ No newline at end of file