Skip to content

Commit f56aa8d

Browse files
authored
Merge pull request #824 from pangolindex/feat/new-version-modal
fix
2 parents 9dc529b + 288ee22 commit f56aa8d

File tree

1 file changed

+37
-5
lines changed

1 file changed

+37
-5
lines changed

src/components/NewVersionModal/index.tsx

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import styled, { css } from 'styled-components'
33
import BetaImage from '../../assets/images/beta-image.jpg'
44
import { ButtonPrimary, ButtonSecondary } from '../Button'
55

6-
const Modal = styled.div`
6+
const Modal = styled.div<{ isOpen: boolean }>`
77
width: 100vw;
88
height: 100dvh;
9-
padding: 144px 0;
9+
padding: 144px 16px;
1010
position: fixed;
1111
z-index: 9999999;
1212
top: 0;
@@ -26,20 +26,34 @@ const Modal = styled.div`
2626
visibility: visible;
2727
opacity: 1;
2828
`}
29+
30+
@media (min-width: 768px) {
31+
padding: 144px 32px;
32+
}
2933
`
3034

3135
const ModalContent = styled.div`
3236
display: flex;
37+
flex-direction: column;
3338
overflow: hidden;
3439
border-radius: 12px;
3540
height: 100%;
3641
background-color: #1c1c1c;
3742
box-shadow: 0 251px 70px hsla(0, 0%, 0%, 0), 0 161px 64px hsla(0, 0%, 0%, 4%), 0 90px 54px hsla(0, 0%, 0%, 13%),
3843
0 40px 40px hsla(0, 0%, 0%, 21%), 0 10px 22px hsla(0, 0%, 0%, 25%);
44+
45+
@media (min-width: 768px) {
46+
flex-direction: row;
47+
}
3948
`
4049

4150
const ModalColumn = styled.div`
4251
flex: 1;
52+
height: 25%;
53+
54+
@media (min-width: 768px) {
55+
height: auto;
56+
}
4357
`
4458

4559
const ModalImage = styled.img`
@@ -54,6 +68,11 @@ const Content = styled(ModalColumn)`
5468
flex-direction: column;
5569
justify-content: center;
5670
gap: 32px;
71+
height: 75%;
72+
73+
@media (min-width: 768px) {
74+
height: auto;
75+
}
5776
`
5877

5978
const ModalTextWrapper = styled.div`
@@ -65,18 +84,30 @@ const ModalTextWrapper = styled.div`
6584
const Actions = styled.div`
6685
display: flex;
6786
gap: 12px;
87+
flex-direction: column;
88+
89+
@media (min-width: 768px) {
90+
flex-direction: row;
91+
}
6892
`
6993

7094
const ModalHeading = styled.h3`
71-
font-size: 36px;
95+
font-size: 24px;
7296
font-weight: bold;
7397
margin: 0;
98+
99+
@media (min-width: 768px) {
100+
font-size: 36px;
101+
}
74102
`
75103

76104
const ModalText = styled.p`
77105
margin: 0;
78106
text-wrap: balance;
79-
max-width: 85%;
107+
108+
@media (min-width: 768px) {
109+
max-width: 85%;
110+
}
80111
`
81112

82113
const BtnPrimary = styled(ButtonPrimary)`
@@ -86,6 +117,7 @@ const BtnPrimary = styled(ButtonPrimary)`
86117
font-weight: semibold;
87118
display: inline-block;
88119
`
120+
89121
const BtnSecondary = styled(ButtonSecondary)`
90122
border-radius: 4px;
91123
font-size: 14px;
@@ -103,7 +135,7 @@ export const NewVersionModal = () => {
103135
const goToBeta = () => window.open('https://beta.pangolin.exchange/', '_blank', 'noopener')
104136

105137
return (
106-
<Modal isOpen={betaModal} onDismiss={toggleModal}>
138+
<Modal isOpen={betaModal}>
107139
<ModalContent>
108140
<ModalColumn>
109141
<ModalImage src={BetaImage} />

0 commit comments

Comments
 (0)