1
- import React from 'react '
1
+ import { ArrowBackIosNewRounded , CloseRounded } from '@mui/icons-material '
2
2
import { Box , Button , Grid , Modal , Typography } from '@mui/material'
3
3
import { useTranslation } from 'react-i18next'
4
4
import styled from 'styled-components'
5
- import { ArrowBackIosNewRounded , CloseRounded } from '@mui/icons-material'
5
+
6
6
interface DonateModalProps {
7
7
isVisible : boolean
8
8
onClose : ( ) => void
@@ -14,46 +14,53 @@ const boxStyle = {
14
14
left : '50%' ,
15
15
transform : 'translate(-50%, -50%)' ,
16
16
maxWidth : '1250px' ,
17
- maxHeight : 'calc(100vh - 210px)' ,
18
- overflowY : 'auto' ,
19
17
width : '80%' ,
20
18
bgcolor : 'background.paper' ,
19
+ outline : 'none' ,
20
+ border : '1px solid #ccc' ,
21
21
boxShadow : 24 ,
22
- borderRadius : '16px' ,
23
- p : 4 ,
22
+ borderRadius : '8px' ,
24
23
} as const
25
24
26
25
const ButtonDonate = styled . a `
27
- margin-top: 32px;
26
+ margin-top: 16px;
27
+ outline: none;
28
28
direction: rtl;
29
29
display: inline-flex;
30
- margin-left: auto;
31
- margin-right: 0;
30
+ align-items: stretch;
32
31
color: white;
33
32
flex-wrap: nowrap;
34
33
text-decoration: none;
35
34
font-weight: bold;
36
35
width: 100%;
37
36
max-width: 420px;
37
+ border-radius: 1000px;
38
+ overflow: hidden;
39
+ transition: ease box-shadow 0.25s;
40
+ box-shadow: transparent 0 0 0 0;
41
+ &:focus {
42
+ box-shadow: #1498e588 0 0 0 3px;
43
+ }
38
44
`
39
45
const ButtonDonateText = styled . span `
40
46
background-color: #16a9ff;
41
- padding: 8px 32px;
42
- width: 100%;
47
+ padding: 8px 32px 8px 8px;
43
48
text-align: center;
44
- border-radius: 0 1000px 1000px 0;
45
49
font-size: 32px;
50
+ width: 100%;
46
51
`
47
52
48
53
const ButtonDonateIcon = styled . span `
49
54
padding: 16px;
50
- border-radius: 1000px 0 0 1000px;
51
55
width: 32px;
52
- height: 32px;
56
+ min-height: 32px;
57
+ display: flex;
58
+ justify-content: center;
59
+ align-items: center;
53
60
background-color: #1498e5;
54
61
`
55
62
56
- export const DonateModal : React . FC < DonateModalProps > = ( { isVisible, onClose } ) => {
63
+ const DonateModal = ( { isVisible, onClose } : DonateModalProps ) => {
57
64
const { t } = useTranslation ( )
58
65
59
66
return (
@@ -64,73 +71,72 @@ export const DonateModal: React.FC<DonateModalProps> = ({ isVisible, onClose })
64
71
role = "dialog"
65
72
aria-labelledby = "modal-modal-title"
66
73
aria-describedby = "modal-modal-description"
67
- sx = { { color : 'text.primary' } } // Dynamically uses the theme’s text color
68
- >
74
+ sx = { { color : 'text.primary' } } >
69
75
< Box sx = { boxStyle } >
70
- < Typography sx = { { display : 'flex' , justifyContent : 'space-between' } } >
76
+ < Typography
77
+ component = "div"
78
+ display = "flex"
79
+ justifyContent = "space-between"
80
+ alignItems = "start"
81
+ padding = { 2 }
82
+ paddingBottom = { 0 } >
71
83
< h1 id = "modal-modal-title" style = { { margin : 0 } } >
72
84
{ t ( 'how_to_donate_title' ) }
73
85
</ h1 >
74
86
< Button
75
87
color = "inherit"
76
- sx = { {
77
- borderRadius : 1000 ,
78
- minWidth : '36px' ,
79
- width : '36px' ,
80
- height : '36px' ,
81
-
82
- padding : '4px' ,
83
- } }
88
+ sx = { { borderRadius : 1000 , minWidth : 32 , width : 32 , height : 32 , padding : '4px' } }
84
89
onClick = { onClose } >
85
90
< CloseRounded sx = { { height : '100%' , width : '100%' } } />
86
91
</ Button >
87
92
</ Typography >
88
- < p > { t ( 'how_to_donate_text' ) } </ p >
89
- < Grid container spacing = { 2 } >
90
- < Grid size = { { xs : 12 , md : 6 } } >
91
- < Typography id = "modal-modal-description" sx = { { mt : 2 } } >
92
- < h2 > { t ( 'donate_through_jgive.com_title' ) } </ h2 >
93
- </ Typography >
94
- < a
95
- href = "https://www.jgive.com/new/he/ils/donation-targets/3268"
96
- target = "_blank"
97
- rel = "noreferrer"
98
- style = { { textDecoration : 'none' , color : 'inherit' } } >
99
- < img
100
- src = "https://www.hasadna.org.il/wp-content/uploads/2017/12/%D7%AA%D7%A8%D7%95%D7%9E%D7%95%D7%AA.jpg"
101
- alt = { t ( 'donation_link' ) }
102
- width = { '100%' }
103
- style = { { maxWidth : '420px' } }
104
- />
105
- </ a >
106
- < br />
107
- < ButtonDonate
108
- href = "https://www.jgive.com/new/he/ils/donation-targets/3268"
109
- target = "_blank"
110
- rel = "noreferrer" >
111
- < ButtonDonateText > { t ( 'donate' ) } </ ButtonDonateText >
112
- < ButtonDonateIcon >
113
- < ArrowBackIosNewRounded sx = { { fontSize : 32 } } />
114
- </ ButtonDonateIcon >
115
- </ ButtonDonate >
116
- </ Grid >
117
- < Grid size = { { xs : 6 , md : 6 } } >
118
- < Typography >
119
- < h2 > { t ( 'donation_through_bank_title' ) } </ h2 >
120
- </ Typography >
121
- < p > { t ( 'donation_through_bank_reccomendation' ) } </ p >
122
- < Typography id = "modal-modal-description" sx = { { mt : 2 } } >
123
- { t ( 'bank' ) } : { t ( 'donation_through_bank_details_bank' ) }
124
- < br />
125
- { t ( 'branch' ) } : { t ( 'donation_through_bank_details_branch' ) }
126
- < br />
127
- { t ( 'account' ) } : { t ( 'donation_through_bank_details_account' ) }
128
- < br />
129
- { t ( 'account_name' ) } : { t ( 'donation_through_bank_details_account_name' ) }
130
- </ Typography >
131
- < sub > { t ( 'donation_through_bank_details_additional_message' ) } </ sub >
93
+ < Box padding = { 2 } overflow = "auto" maxHeight = "calc(100vh - 210px)" >
94
+ < p style = { { margin : 0 } } > { t ( 'how_to_donate_text' ) } </ p >
95
+ < Grid container spacing = { 2 } >
96
+ < Grid size = { { xs : 12 , md : 6 } } >
97
+ < Typography component = "div" id = "modal-modal-description" >
98
+ < h2 > { t ( 'donate_through_jgive.com_title' ) } </ h2 >
99
+ </ Typography >
100
+ < a
101
+ href = "https://www.jgive.com/new/he/ils/donation-targets/3268"
102
+ target = "_blank"
103
+ rel = "noreferrer"
104
+ style = { { textDecoration : 'none' , color : 'inherit' , outline : 'none' } } >
105
+ < img
106
+ src = "https://www.hasadna.org.il/wp-content/uploads/2017/12/%D7%AA%D7%A8%D7%95%D7%9E%D7%95%D7%AA.jpg"
107
+ alt = { t ( 'donation_link' ) }
108
+ width = "100%"
109
+ style = { { maxWidth : '420px' , borderRadius : 8 } }
110
+ />
111
+ </ a >
112
+ < ButtonDonate
113
+ href = "https://www.jgive.com/new/he/ils/donation-targets/3268"
114
+ target = "_blank"
115
+ rel = "noreferrer" >
116
+ < ButtonDonateText > { t ( 'donate' ) } </ ButtonDonateText >
117
+ < ButtonDonateIcon >
118
+ < ArrowBackIosNewRounded sx = { { fontSize : 32 } } />
119
+ </ ButtonDonateIcon >
120
+ </ ButtonDonate >
121
+ </ Grid >
122
+ < Grid size = { { xs : 12 , md : 6 } } >
123
+ < Typography component = "div" >
124
+ < h2 > { t ( 'donation_through_bank_title' ) } </ h2 >
125
+ </ Typography >
126
+ < p > { t ( 'donation_through_bank_reccomendation' ) } </ p >
127
+ < Typography id = "modal-modal-description" sx = { { mt : 2 } } >
128
+ { t ( 'bank' ) } : { t ( 'donation_through_bank_details_bank' ) }
129
+ < br />
130
+ { t ( 'branch' ) } : { t ( 'donation_through_bank_details_branch' ) }
131
+ < br />
132
+ { t ( 'account' ) } : { t ( 'donation_through_bank_details_account' ) }
133
+ < br />
134
+ { t ( 'account_name' ) } : { t ( 'donation_through_bank_details_account_name' ) }
135
+ </ Typography >
136
+ < sub > { t ( 'donation_through_bank_details_additional_message' ) } </ sub >
137
+ </ Grid >
132
138
</ Grid >
133
- </ Grid >
139
+ </ Box >
134
140
</ Box >
135
141
</ Modal >
136
142
)
0 commit comments