-
Notifications
You must be signed in to change notification settings - Fork 504
/
index.tsx
75 lines (71 loc) · 1.93 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import { FormattedMessage } from 'react-intl'
import { Icon } from 'blockchain-info-components'
import { SBPaymentMethodType } from 'core/types'
import { Title } from 'components/Flyout'
import React, { ReactElement } from 'react'
import styled from 'styled-components'
const DisplayContainer = styled.div`
display: flex;
width: 100%;
align-items: center;
box-sizing: border-box;
padding: 16px 40px;
flex-direction: row;
cursor: pointer;
border-bottom: 1px solid ${props => props.theme.grey000};
&hover {
background-color: ${props => props.theme.grey100};
}
`
const Content = styled.div`
position: relative;
display: flex;
flex-direction: column;
width: 100%;
margin-left: 16px;
color: ${props => props.theme.grey800};
`
const DisplayIcon = styled.div`
position: relative;
display: flex;
flex-direction: column;
font-size: 16px;
font-weight: 500;
color: ${props => props.theme.grey800};
`
const DisplayTitle = styled(Title)`
align-items: left;
font-weight: 600;
font-size: 16px;
display: flex;
flex-direction: column;
color: ${props => props.theme.textBlack};
width: 100%;
margin-bottom: 2px;
`
type Props = {
icon: ReactElement
onClick: (string) => void
text: string
value: SBPaymentMethodType
}
const BankAccount: React.FC<Props> = ({ value, onClick, icon, text }) => (
<DisplayContainer
data-e2e={`sb${value.type.toLowerCase()}BankAccount`}
role='button'
onClick={onClick}
>
<DisplayIcon>{icon}</DisplayIcon>
<Content>
<DisplayTitle>{text}</DisplayTitle>
<Title>
<FormattedMessage
id='modals.simplebuy.depositcash_description'
defaultMessage='Send funds directly from your bank to your Blockchain.com Wallet. Once we receive the manual transfer, use that cash to buy crypto.'
/>
</Title>
</Content>
<Icon name='chevron-right' size='24px' color='grey400' />
</DisplayContainer>
)
export default BankAccount