-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #446 from galacticcouncil/rococo
Rococo -> prod
- Loading branch information
Showing
34 changed files
with
563 additions
and
106 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,4 @@ | ||
/* | ||
X-XSS-Protection: 1; mode=block | ||
X-Frame-Options: DENY | ||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,19 @@ | ||
import { ButtonProps } from "../Button/Button" | ||
import { useTranslation } from "react-i18next" | ||
import { Button } from "../Button/Button" | ||
|
||
type Props = Pick<ButtonProps, "onClick"> | ||
|
||
export const FundWalletButton = (props: Props) => { | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<Button | ||
{...props} | ||
variant="primary" | ||
sx={{ fontSize: 12, lineHeight: 12, p: "11px 15px" }} | ||
> | ||
{t("fund.button")} | ||
</Button> | ||
) | ||
} |
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,16 @@ | ||
import { Button, ButtonProps } from "../Button/Button" | ||
import { useTranslation } from "react-i18next" | ||
import { ReactComponent as FundIcon } from "assets/icons/FundIcon.svg" | ||
|
||
type Props = Pick<ButtonProps, "onClick"> | ||
|
||
export const FundWalletMobileButton = (props: Props) => { | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<Button {...props} variant="primary" fullWidth={true}> | ||
<FundIcon /> | ||
{t("fund.button")} | ||
</Button> | ||
) | ||
} |
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,24 @@ | ||
import styled from "@emotion/styled" | ||
|
||
export const SBlocks = styled.div` | ||
display: flex; | ||
flex-flow: column; | ||
row-gap: 9px; | ||
` | ||
|
||
const SBlock = styled.div` | ||
border-radius: 12px; | ||
padding: 31px 29px; | ||
` | ||
|
||
export const SBanxaBlock = styled(SBlock)` | ||
background-color: rgba(0, 210, 190, 0.1); | ||
` | ||
|
||
export const SKrakenBlock = styled(SBlock)` | ||
background-color: rgba(66, 43, 210, 0.26); | ||
` | ||
|
||
export const SCryptoBlock = styled(SBlock)` | ||
background-color: rgba(218, 255, 238, 0.06); | ||
` |
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,82 @@ | ||
import { Modal } from "../Modal/Modal" | ||
import { ComponentProps } from "react" | ||
import { GradientText } from "components/Typography/GradientText/GradientText" | ||
import { Text } from "components/Typography/Text/Text" | ||
import { | ||
SBanxaBlock, | ||
SCryptoBlock, | ||
SKrakenBlock, | ||
SBlocks, | ||
} from "./FundWalletModal.styled" | ||
import { ReactComponent as KrakenLogo } from "assets/icons/KrakenLogo.svg" | ||
import BanxaLogo from "assets/icons/BanxaLogo.png" | ||
import { CryptoBlockTitle } from "./components/CryptoBlockTitle" | ||
import { BlockContent } from "./components/BlockContent" | ||
import { useTranslation } from "react-i18next" | ||
import { LINKS } from "utils/navigation" | ||
import { useMedia } from "react-use" | ||
import { theme } from "theme" | ||
|
||
type Props = Pick<ComponentProps<typeof Modal>, "open" | "onClose"> | ||
|
||
export const FundWalletModal = ({ open, onClose }: Props) => { | ||
const { t } = useTranslation() | ||
const isDesktop = useMedia(theme.viewport.gte.sm) | ||
|
||
return ( | ||
<> | ||
<Modal | ||
width={610} | ||
open={open} | ||
onClose={onClose} | ||
withoutCloseOutside={true} | ||
> | ||
<div> | ||
<GradientText fs={20} fw={600}> | ||
{t("fund.modal.title")} | ||
</GradientText> | ||
</div> | ||
<Text | ||
fw={400} | ||
lh={24} | ||
color="neutralGray400" | ||
css={{ marginBottom: "28px", marginTop: "8px" }} | ||
> | ||
{t("fund.modal.description")} | ||
</Text> | ||
<SBlocks> | ||
<SBanxaBlock> | ||
<BlockContent | ||
title={<img alt="Banxa" width={100} src={BanxaLogo} />} | ||
description={t("fund.modal.banxa.description")} | ||
linkText={t("fund.modal.banxa.buy")} | ||
link="https://banxa.com/" | ||
onLinkClick={onClose} | ||
/> | ||
</SBanxaBlock> | ||
<SKrakenBlock> | ||
<BlockContent | ||
title={<KrakenLogo />} | ||
description={t("fund.modal.kraken.description")} | ||
linkText={t("fund.modal.kraken.buy")} | ||
link="https://kraken.com/" | ||
onLinkClick={onClose} | ||
/> | ||
</SKrakenBlock> | ||
<Text fw={400} tAlign="center" color="neutralGray400"> | ||
or | ||
</Text> | ||
<SCryptoBlock> | ||
<BlockContent | ||
title={<CryptoBlockTitle />} | ||
description={t("fund.modal.crypto.description")} | ||
linkText={t(isDesktop ? "fund.modal.crypto.buy" : "go")} | ||
link={LINKS.cross_chain} | ||
onLinkClick={onClose} | ||
/> | ||
</SCryptoBlock> | ||
</SBlocks> | ||
</Modal> | ||
</> | ||
) | ||
} |
35 changes: 35 additions & 0 deletions
35
src/components/FundWallet/components/BlockContent.styled.ts
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,35 @@ | ||
import styled from "@emotion/styled" | ||
import { Text } from "components/Typography/Text/Text" | ||
import { theme } from "theme" | ||
|
||
export const SBlockDescription = styled(Text)` | ||
grid-column: span 2; | ||
@media ${theme.viewport.gte.sm} { | ||
grid-column: initial; | ||
} | ||
` | ||
export const SBlockContent = styled.div` | ||
display: grid; | ||
grid-template-columns: 2fr 1fr; | ||
row-gap: 10px; | ||
` | ||
export const SLinkText = styled(Text)` | ||
white-space: nowrap; | ||
` | ||
|
||
export const SBlockLink = styled.div` | ||
justify-self: end; | ||
@media ${theme.viewport.gte.sm} { | ||
align-self: center; | ||
grid-row: span 2; | ||
} | ||
` | ||
|
||
export const SLinkContent = styled.div` | ||
display: flex; | ||
color: ${theme.colors.white}; | ||
align-items: center; | ||
column-gap: 3px; | ||
` |
Oops, something went wrong.