Skip to content

Commit ba408cb

Browse files
author
Maria Mattlin
committed
Merge branch 'dev' into PROD-2332_incorrect-web-price
2 parents 70a36d2 + ad511e2 commit ba408cb

File tree

5 files changed

+79
-62
lines changed

5 files changed

+79
-62
lines changed

src/ScrollToTop.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
import { useLocation } from "react-router-dom";
12
import React from "react";
23

3-
export const ScrollToTop = ({ children, location }) => {
4-
React.useEffect(() => window.scrollTo(0, 0), [location?.pathname]);
4+
export const ScrollToTop = ({ children }) => {
5+
const location = useLocation();
6+
React.useEffect(() => {
7+
window.scrollTo(0, 0);
8+
}, [location?.pathname]);
59
return children;
610
};

src/components/FormElements/FormInputCheckbox/index.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@ const FormInputCheckbox = ({
2020
...props
2121
}) => {
2222
return inline ? (
23-
<div className={cn(styles["styles.inline"])}>
24-
<label className={cn(styles["styles.form-input-checkbox"], !!styleName ? styles[styleName] : undefined)}>
23+
<div className={cn(styles["inline"])}>
24+
<label className={cn(styles["form-input-checkbox"], !!styleName ? styles[styleName] : undefined)}>
2525
<Checkbox
2626
className={"form-input-rc-checkbox"}
2727
onChange={onChange}
2828
{...props}
2929
/>
30-
<span className={styles["styles.label"]}>
30+
<span className={styles["label"]}>
3131
{label} {additionalContent}
3232
</span>
3333
</label>
3434
</div>
3535
) : (
3636
// eslint-disable-next-line jsx-a11y/label-has-associated-control
37-
<label className={cn(styles["styles.form-input-checkbox"], !!styleName ? styles[styleName] : undefined)}>
37+
<label className={cn(styles["form-input-checkbox"], !!styleName ? styles[styleName] : undefined)}>
3838
<Checkbox
3939
className={"form-input-rc-checkbox"}
4040
onChange={onChange}
4141
{...props}
4242
/>
43-
<span className={styles["styles.label"]}>
43+
<span className={styles["label"]}>
4444
{label} {additionalContent}
4545
</span>
4646
</label>

src/routes/Products/components/StyleOptions/styles.module.scss

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,39 @@
2323
.box {
2424
border: 1px solid $black-20;
2525
border-radius: 4px;
26-
}
27-
28-
.preview {
29-
width: 240px;
30-
height: 200px;
31-
cursor: pointer;
32-
}
33-
34-
.actions {
35-
display: flex;
36-
justify-content: center;
37-
padding: 20px;
38-
39-
svg {
40-
width: 25px;
41-
height: 25px;
42-
margin-left: 10px;
43-
margin-right: 10px;
26+
.preview {
27+
width: 240px;
28+
height: 200px;
29+
cursor: pointer;
30+
}
31+
32+
.actions {
33+
display: flex;
34+
justify-content: center;
35+
padding: 20px;
36+
37+
svg {
38+
width: 25px;
39+
height: 25px;
40+
margin-left: 10px;
41+
margin-right: 10px;
42+
}
43+
44+
.liked {
45+
fill: $green1;
46+
47+
* {
48+
fill: $green1;
49+
}
50+
}
51+
52+
.disliked {
53+
fill: $green1;
54+
55+
* {
56+
fill: $green1;
57+
}
58+
}
4459
}
4560
}
4661

@@ -101,22 +116,6 @@
101116
}
102117
}
103118

104-
.liked {
105-
fill: $green1;
106-
107-
* {
108-
fill: $green1;
109-
}
110-
}
111-
112-
.disliked {
113-
fill: $green1;
114-
115-
* {
116-
fill: $green1;
117-
}
118-
}
119-
120119
.name {
121120
@include font-roboto;
122121
display: flex;

src/routes/Products/components/StyleOptionsModal/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const StylesOptionsModal = ({
2626
const modalWidth = isMobile ? { fullWidth: true } : { halfWidth: true };
2727
return (
2828
<Modal show={true} {...modalWidth} handleClose={onDismiss}>
29-
<div className={styles["styleOptions"]}>
29+
<div className={styles["styleWrapper"]}>
3030
<div className={classNames(styles["style"], styles[style.className])}>
3131
<div className={styles["name"]}>
3232
<span>{style.name}</span> &nbsp;

src/routes/Products/components/StyleOptionsModal/styles.module.scss

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,42 @@
2020
.box {
2121
border: 1px solid $black-20;
2222
border-radius: 4px;
23-
}
24-
25-
.preview {
26-
width: 100%;
27-
height: 450px;
28-
max-height: calc(100vh - 450px);
29-
30-
@include ltemd {
31-
max-height: calc(100vh - 550px);
23+
.preview {
24+
width: 100%;
25+
height: 450px;
26+
max-height: calc(100vh - 450px);
27+
28+
@include ltemd {
29+
max-height: calc(100vh - 550px);
30+
}
3231
}
33-
}
34-
35-
.actions {
36-
display: flex;
37-
justify-content: center;
38-
padding: 20px;
3932

40-
svg {
41-
width: 25px;
42-
height: 25px;
43-
margin-left: 10px;
44-
margin-right: 10px;
33+
.actions {
34+
display: flex;
35+
justify-content: center;
36+
padding: 20px;
37+
38+
.liked {
39+
fill: $green1;
40+
41+
* {
42+
fill: $green1;
43+
}
44+
}
45+
46+
.disliked {
47+
fill: $green1;
48+
49+
* {
50+
fill: $green1;
51+
}
52+
}
53+
svg {
54+
width: 25px;
55+
height: 25px;
56+
margin-left: 10px;
57+
margin-right: 10px;
58+
}
4559
}
4660
}
4761

0 commit comments

Comments
 (0)