Skip to content

Commit

Permalink
Allow mobile pop-up to close
Browse files Browse the repository at this point in the history
  • Loading branch information
BetsyBraddock authored and creed-victor committed Dec 16, 2020
1 parent 4121386 commit 951c310
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/components/TutorialDialog/container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function TutorialDialog() {
/>
</div>
<div className="d-block d-md-none">
<MobileNotReady />
<MobileNotReady handleClose={handleClose} />
</div>
</>
)}
Expand Down
15 changes: 14 additions & 1 deletion src/app/components/TutorialDialog/mobileNotReady/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import React, { useState, useEffect } from 'react';
import MailchimpSubscribe from 'react-mailchimp-subscribe';
import background from 'assets/images/tutorial/mobile-not-ready-bg.svg';
import successBg from 'assets/images/tutorial/email_success_bg.svg';
import close from 'assets/images/tutorial/close.svg';

import { translations } from 'locales/i18n';
import { useTranslation } from 'react-i18next';

export function MobileNotReady() {
export function MobileNotReady(props) {
const { t } = useTranslation();
const s = translations.mobileNotReady;
const [status, setStatus] = useState('');
Expand Down Expand Up @@ -54,6 +55,12 @@ export function MobileNotReady() {
{status !== 'success' && (
<>
<div className="mobile-not-ready-img position-absolute">
<div
className="close-mobile position-absolute"
onClick={props.handleClose}
>
<img src={close} alt="close" />
</div>
<img src={background} alt="" className="h-100 w-100" />
<div className="mobile-not-ready-text position-absolute">
<p>{t(s.p1)}</p>
Expand Down Expand Up @@ -85,6 +92,12 @@ export function MobileNotReady() {
{status === 'success' && (
<>
<div className="email-success position-absolute">
<div
className="close-mobile position-absolute"
onClick={props.handleClose}
>
<img src={close} alt="close" />
</div>
<img className="h-100 w-100" src={successBg} alt="" />
<div className="mobile-not-ready-text--success position-absolute">
<p>{t(s.success)}</p>
Expand Down
3 changes: 3 additions & 0 deletions src/styles/sass/_mobile-wallet-tutorial.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
transform: translate(-50%, -50%);
@include fade-in(1s);
}
.close-mobile {
top: 0% !important;
}
[class^='title'] {
color: var(--black);
top: 6%;
Expand Down

0 comments on commit 951c310

Please sign in to comment.