-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new component DownloadModal and remove relauncher modal
- Loading branch information
Showing
5 changed files
with
138 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
.ui.modal.download-modal { | ||
max-width: 520px; | ||
position: relative; | ||
text-align: center; | ||
padding: 48px 80px; | ||
} | ||
|
||
.ui.modal.download-modal .dg.Title, | ||
.ui.modal.download-modal .dg.SubTitle, | ||
.ui.modal.download-modal .dg.Paragraph { | ||
margin-top: 0; | ||
} | ||
|
||
.ui.modal.download-modal .dg.Title, | ||
.ui.modal.download-modal .dg.SubTitle { | ||
font-size: 21px; | ||
font-weight: 600; | ||
font-stretch: normal; | ||
font-style: normal; | ||
line-height: 1.43; | ||
letter-spacing: 0.3px; | ||
text-align: center; | ||
} | ||
|
||
.ui.modal.download-modal .dg.Paragraph { | ||
font-size: 17px; | ||
font-weight: normal; | ||
font-stretch: normal; | ||
font-style: normal; | ||
line-height: 1.53; | ||
letter-spacing: -0.2px; | ||
text-align: center; | ||
} | ||
|
||
.ui.modal.download-modal .download-modal__close { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
padding: 14px; | ||
cursor: pointer; | ||
} | ||
|
||
.ui.modal.download-modal .ui.button { | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React, { useCallback } from "react" | ||
|
||
import Paragraph from "decentraland-gatsby/dist/components/Text/Paragraph" | ||
import Title from "decentraland-gatsby/dist/components/Text/Title" | ||
import useFormatMessage from "decentraland-gatsby/dist/hooks/useFormatMessage" | ||
import TokenList from "decentraland-gatsby/dist/utils/dom/TokenList" | ||
import { Button } from "decentraland-ui/dist/components/Button/Button" | ||
import { Modal, ModalProps } from "decentraland-ui/dist/components/Modal/Modal" | ||
|
||
import ExplorerJumpinImage from "../../images/explorer-jumpin-modal.svg" | ||
import closeIcon from "../../images/popup-close.svg" | ||
|
||
import "./DownloadModal.css" | ||
|
||
export default function DownloadModal(props: ModalProps) { | ||
const { onModalClick, onClose } = props | ||
const l = useFormatMessage() | ||
|
||
const handleClose = useCallback( | ||
(event: React.MouseEvent<HTMLElement>) => { | ||
if (onClose) { | ||
onClose(event, props) | ||
} | ||
}, | ||
[onClose, props] | ||
) | ||
|
||
return ( | ||
<Modal | ||
{...props} | ||
className={TokenList.join(["download-modal", props.className])} | ||
> | ||
<div className="download-modal__close" onClick={handleClose}> | ||
<img src={closeIcon} width="14" height="14" /> | ||
</div> | ||
|
||
<div> | ||
<img src={ExplorerJumpinImage} alt="Explorer Jump In" /> | ||
</div> | ||
<Title>{l(`components.modal.download.title`)}</Title> | ||
<Paragraph>{l(`components.modal.download.description`)}</Paragraph> | ||
<Button | ||
primary | ||
onClick={onModalClick} | ||
className="jump-in-position__modal-button" | ||
> | ||
{l(`components.modal.download.button_label`)} | ||
</Button> | ||
</Modal> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters