Skip to content

Commit

Permalink
Added fund button icon
Browse files Browse the repository at this point in the history
  • Loading branch information
kolebjak committed Jul 12, 2023
1 parent 7772389 commit 267da30
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 28 deletions.
16 changes: 16 additions & 0 deletions src/assets/icons/FundCryptoIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 3 additions & 15 deletions src/assets/icons/FundIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 10 additions & 5 deletions src/components/FundWallet/FundWalletButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button, ButtonProps } from "../Button/Button"
import styled from "@emotion/styled"
import { useTranslation } from 'react-i18next'

const SButton = styled(Button)`
font-size: 12px;
Expand All @@ -9,8 +10,12 @@ const SButton = styled(Button)`

type Props = Pick<ButtonProps, "onClick">

export const FundWalletButton = (props: Props) => (
<SButton {...props} variant="primary">
Fund wallet
</SButton>
)
export const FundWalletButton = (props: Props) => {
const { t } = useTranslation();

return (
<SButton {...props} variant="primary">
{t('fund.button')}
</SButton>
)
}
16 changes: 11 additions & 5 deletions src/components/FundWallet/FundWalletMobileButton.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
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) => (
<Button {...props} variant="primary" fullWidth={true}>
Fund wallet
</Button>
)
export const FundWalletMobileButton = (props: Props) => {
const { t } = useTranslation();

return (
<Button {...props} variant="primary" fullWidth={true}>
<FundIcon />{t('fund.button')}
</Button>
)
}
4 changes: 2 additions & 2 deletions src/components/FundWallet/components/CryptoBlockTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Heading } from "../../Typography/Heading/Heading"
import { ReactComponent as FundIcon } from "assets/icons/FundIcon.svg"
import { ReactComponent as FundCryptoIcon } from "assets/icons/FundCryptoIcon.svg"
import styled from "@emotion/styled"
import { useTranslation } from "react-i18next"

Expand All @@ -14,7 +14,7 @@ export const CryptoBlockTitle = () => {

return (
<SWrapper>
<FundIcon />
<FundCryptoIcon />
<Heading as="h2" fw={600} fs={20}>
{t("fund.modal.crypto.title")}
</Heading>
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -356,5 +356,6 @@
"fund.modal.kraken.buy": "Buy on Kraken",
"fund.modal.crypto.title": "Fund with crypto",
"fund.modal.crypto.description": "Looking to fund your wallet with crypto? Head to our cross-chain UI.",
"fund.modal.crypto.buy": "Use cross-chain"
"fund.modal.crypto.buy": "Use cross-chain",
"fund.button": "Fund wallet"
}

0 comments on commit 267da30

Please sign in to comment.