File tree Expand file tree Collapse file tree 5 files changed +79
-62
lines changed
components/FormElements/FormInputCheckbox
routes/Products/components Expand file tree Collapse file tree 5 files changed +79
-62
lines changed Original file line number Diff line number Diff line change 1+ import { useLocation } from "react-router-dom" ;
12import 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} ;
Original file line number Diff line number Diff 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 >
Original file line number Diff line number Diff line change 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
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 ;
Original file line number Diff line number Diff 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 >
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments