File tree Expand file tree Collapse file tree 3 files changed +35
-6
lines changed
src/shared/ui/OrderSuccesModal Expand file tree Collapse file tree 3 files changed +35
-6
lines changed Original file line number Diff line number Diff line change @@ -42,4 +42,7 @@ next-env.d.ts
4242
4343# app secrets
4444/src /.secrets
45- .secret_key.txt
45+ .secret_key.txt
46+
47+ # reviews
48+ reviews /
Original file line number Diff line number Diff line change 11'use client' ;
2- import React from 'react' ;
2+ import React , { useMemo } from 'react' ;
33import Typography from '@mui/material/Typography' ;
44import { ModalComponent } from '@/shared/ui/Modal' ;
55import { Box } from '@mui/material' ;
66import s from './style.module.scss' ;
7+ import { useWindowWidth } from '@/shared/hooks' ;
78
89type ModalComponentProps = {
910 open : boolean ;
@@ -17,13 +18,27 @@ export const OrderSuccesModal: React.FC<ModalComponentProps> = ({
1718 const onClose = ( ) => {
1819 setOpen ( false ) ;
1920 } ;
21+ const windowWidth = useWindowWidth ( ) ;
22+ const style = useMemo ( ( ) => {
23+ if ( windowWidth >= 420 ) return { } ;
24+ return { width : '90%' , height : 'fit-content' } ;
25+ } , [ windowWidth ] ) ;
2026 return (
21- < ModalComponent withControl = { false } open = { open } onClose = { onClose } >
22- < div style = { { padding : 20 } } >
27+ < ModalComponent
28+ style = { style }
29+ withControl = { false }
30+ open = { open }
31+ onClose = { onClose }
32+ >
33+ < div className = { s . container } >
2334 < Typography id = "modal-modal-title" variant = "h6" component = "h2" >
2435 Заказ успешно отправлен.
2536 </ Typography >
26- < Typography id = "modal-modal-description" sx = { { mt : 2 } } >
37+ < Typography
38+ className = { s . text }
39+ id = "modal-modal-description"
40+ sx = { { mt : 2 } }
41+ >
2742 Представитель мастерской вам перезвонит для уточнения объема заказа.
2843 </ Typography >
2944 < Box
Original file line number Diff line number Diff line change 1+ .container {
2+ padding : 20px ;
3+ background-color : #0a0a0a ;
4+ }
15.button {
26 all : unset ;
37 border : 1px solid white ;
1014 cursor : pointer ;
1115 width : 300px ;
1216 height : 35px ;
13-
17+ @media (max-width : 350px ) {
18+ width : 100% ;
19+ height : fit-content ;
20+ }
1421 & :hover {
1522 color : #e49e00 ;
1623 border-color : #e49e00 ;
2027 animation : pulseBorder 2s infinite ;
2128 }
2229}
30+
31+ .text {
32+ height : fit-content ;
33+ }
You can’t perform that action at this time.
0 commit comments