-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(refactor): refactor payment methods
- Loading branch information
1 parent
e06e027
commit ab6484f
Showing
17 changed files
with
326 additions
and
451 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
49 changes: 0 additions & 49 deletions
49
...lockchain-wallet-v4-frontend/src/modals/BuySell/PaymentMethods/Methods/ApplePay/index.tsx
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
...ockchain-wallet-v4-frontend/src/modals/BuySell/PaymentMethods/Methods/GooglePay/index.tsx
This file was deleted.
Oops, something went wrong.
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
53 changes: 53 additions & 0 deletions
53
...chain-wallet-v4-frontend/src/modals/BuySell/PaymentMethods/Methods/MobileMethod/index.tsx
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,53 @@ | ||
import React from 'react' | ||
import { FormattedMessage } from 'react-intl' | ||
import styled from 'styled-components' | ||
|
||
import { Icon, Image } from 'blockchain-info-components' | ||
import { | ||
Content, | ||
Description, | ||
DisplayContainer, | ||
DisplayIcon, | ||
DisplaySubTitle, | ||
DisplayTitle | ||
} from 'components/BuySell' | ||
|
||
const MobileTitle = styled(DisplayTitle)` | ||
margin-bottom: 2px; | ||
` | ||
const MobileIcon = styled(DisplayIcon)` | ||
min-height: 60px; | ||
` | ||
|
||
type Props = { | ||
onClick: (string) => void | ||
type: 'apple' | 'google' | ||
} | ||
|
||
const MobileMethod = ({ onClick, type }: Props) => { | ||
const capType = type.charAt(0).toUpperCase() + type.slice(1) | ||
return ( | ||
<DisplayContainer role='button' onClick={onClick}> | ||
<MobileIcon> | ||
<Image name={`${type}-pay`} height='18px' /> | ||
</MobileIcon> | ||
<Content> | ||
<MobileTitle> | ||
<FormattedMessage id={`modals.simplebuy.${type}pay`} defaultMessage={`${capType} Pay`} /> | ||
</MobileTitle> | ||
<DisplaySubTitle> | ||
<FormattedMessage id='copy.instantly_available' defaultMessage='Instantly Available' /> | ||
</DisplaySubTitle> | ||
<Description> | ||
<FormattedMessage | ||
id={`modals.simplebuy.${type}pay.description`} | ||
defaultMessage={`Simply tap Buy with ${capType} Pay`} | ||
/> | ||
</Description> | ||
</Content> | ||
<Icon name='chevron-right' size='24px' color='grey400' /> | ||
</DisplayContainer> | ||
) | ||
} | ||
|
||
export default MobileMethod |
Oops, something went wrong.