Skip to content

Commit

Permalink
some responsive fixes for Product details page
Browse files Browse the repository at this point in the history
  • Loading branch information
Moamal-2000 committed Mar 27, 2024
1 parent 5c47499 commit 9ae6497
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,24 @@ const ProductDealingControls = () => {
</button>
</div>

<button type="button" className={s.buyButton} onClick={handleBuyProduct}>
Buy Now
</button>

<button type="button" className={s.addToFav} aria-label="Add to favorite">
<SvgIcon name="heart" />
<ToolTip left="50%" top="60px" content="Add to favorite" />
</button>
<div className={s.wrapper}>
<button
type="button"
className={s.buyButton}
onClick={handleBuyProduct}
>
Buy Now
</button>

<button
type="button"
className={s.addToFav}
aria-label="Add to favorite"
>
<SvgIcon name="heart" />
<ToolTip left="50%" top="60px" content="Add to favorite" />
</button>
</div>
</section>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
margin: 18px 0 54px;
}

@media (max-width: 480px) {
.dealing {
flex-direction: column;
}
}

.customNumberInput {
display: flex;
align-items: center;
Expand Down Expand Up @@ -68,6 +74,12 @@
}
}

.wrapper {
display: flex;
align-items: center;
gap: 20px;
}

.buyButton {
outline: none;
border: none;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useRef } from "react";
import { useSelector } from "react-redux";
import ProductPreview from "../ProductPreviw/ProductPreview";
import ProductColorsSection from "./ProductColorsSection";
import ProductDealingControls from "./ProductDealingControls";
import s from "./ProductDetails.module.scss";
import ProductFeatures from "./ProductFeatures";
import ProductFirstInfos from "./ProductFirstInfos";
import ProductSizes from "./ProductSizes";
import ProductColorsSection from "./ProductColorsSection";

const ProductDetails = ({ data }) => {
const { previewImg, isZoomInPreviewActive } = useSelector(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

@include large {
.detailsSection {
height: auto;
flex-direction: column;
align-items: center;
}
Expand Down Expand Up @@ -89,5 +90,6 @@
@include large {
.horizontalLine {
max-width: 100%;
min-width: auto;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
margin: 10px 0;
}

@include very-small {
.rateAndReviews {
flex-direction: column;
}
}

/* [Stars] */
.rateAndReviews>* {
gap: 6px;
Expand All @@ -28,6 +34,12 @@
border-right: solid 2px var(--dark-gray);
}

@include very-small {
.verticalLine {
display: none;
}
}

.greenText {
font-size: .875rem;
color: var(--green);
Expand Down

0 comments on commit 9ae6497

Please sign in to comment.