File tree Expand file tree Collapse file tree 6 files changed +41
-2
lines changed
OrderButton/ui/MakeOrderModal
OrderConsultationButton/ui/OrderConsultationModal Expand file tree Collapse file tree 6 files changed +41
-2
lines changed Original file line number Diff line number Diff line change 11'use client' ;
22import React from 'react' ;
33import { ModalComponent } from '@/shared/ui/Modal' ;
4+ import { useWindowWidth } from '@/shared/hooks' ;
45
56type ModalComponentProps = {
67 open : boolean ;
@@ -13,12 +14,14 @@ export const MakeOrderModal: React.FC<ModalComponentProps> = ({
1314 onClose = ( ) => { } ,
1415 children,
1516} ) => {
17+ const windowWidth = useWindowWidth ( ) ;
18+ const width = windowWidth >= 820 ? 800 : '90%' ;
1619 return (
1720 < ModalComponent
1821 open = { open }
1922 onClose = { onClose }
2023 withControl = { false }
21- style = { { height : 645 , width : 800 , border : 'none' } }
24+ style = { { height : 645 , width, border : 'none' } }
2225 >
2326 { children }
2427 </ ModalComponent >
Original file line number Diff line number Diff line change 22import React from 'react' ;
33import { ModalComponent } from '@/shared/ui/Modal' ;
44import { OrderConsultationForm } from './ui/OrderConsultationForm' ;
5+ import { useWindowWidth } from '@/shared/hooks' ;
56
67type ModalComponentProps = {
78 open : boolean ;
@@ -12,12 +13,17 @@ export const OrderConsultationModal: React.FC<ModalComponentProps> = ({
1213 open,
1314 onClose = ( ) => { } ,
1415} ) => {
16+ const windowWidth = useWindowWidth ( ) ;
17+ const style =
18+ windowWidth >= 420
19+ ? { height : 190 }
20+ : { height : 'fitContent' , width : '90%' } ;
1521 return (
1622 < ModalComponent
1723 open = { open }
1824 onClose = { onClose }
1925 withControl = { false }
20- style = { { height : 190 } }
26+ style = { style }
2127 >
2228 < OrderConsultationForm />
2329 </ ModalComponent >
Original file line number Diff line number Diff line change 1313 width : 300px ;
1414 height : 35px ;
1515 text-align : center ;
16+
17+ @media (max-width : 310px ) {
18+ width : fit-content ;
19+ height : fit-content ;
20+ min-height : 35px ;
21+ box-sizing : border-box ;
22+ padding-right : 10px ;
23+ padding-left : 10px ;
24+ }
1625 }
1726
1827 & :hover {
Original file line number Diff line number Diff line change 1414 align-items : center ;
1515 box-sizing : border-box ;
1616 height : 50px ;
17+ @media (max-width : 420px ) {
18+ padding-right : 10px ;
19+ padding-left : 10px ;
20+ }
1721 span {
1822 color : #e49e00 ;
1923 font-size : 20px ;
24+ @media (max-width : 420px ) {
25+ text-align : center ;
26+ }
2027 }
2128 & NotAuth {
2229 font-size : 16px ;
3239 padding : 10px ;
3340 padding-bottom : 0 ;
3441
42+ @media (max-width : 420px ) {
43+ align-items : center ;
44+ }
45+
3546 & Errors {
3647 height : 15px ;
3748 width : 80% ;
Original file line number Diff line number Diff line change 1313 }
1414 @media (max-width : 520px ) {
1515 flex-direction : column ;
16+ align-items : center ;
1617 gap : 10px ;
1718 }
1819 }
169170 flex-direction : row ;
170171 align-items : center ;
171172 justify-content : center ;
173+ @media (max-width : 370px ) {
174+ width : 100% ;
175+ flex-direction : column ;
176+ }
172177 }
173178
174179 & Item {
181186 border : 2px solid #e49e00 ;
182187 padding-right : 4px ;
183188 padding-left : 4px ;
189+ @media (max-width : 370px ) {
190+ width : 100% ;
191+ }
184192
185193 & :hover {
186194 color : #e49e00 ;
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ $WIDTH: 800px;
4040 box-sizing : border-box ;
4141 padding : 30px ;
4242 position : relative ;
43+ background-color : #0a0a0a ;
44+
4345 @media (max-width : 820px ) {
4446 width : 100% ;
4547 padding : 20px ;
You can’t perform that action at this time.
0 commit comments