-
Notifications
You must be signed in to change notification settings - Fork 504
/
template.success.js
45 lines (41 loc) · 1.29 KB
/
template.success.js
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
import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import FiatDisplay from 'components/Display/FiatDisplay'
import { LinkContainer } from 'react-router-bootstrap'
import { FormattedMessage } from 'react-intl'
import { Banner, Text } from 'blockchain-info-components'
const Wrapper = styled.div`
display: inline-flex;
flex-direction: row;
align-items: center;
padding-left: 5px;
margin-bottom: 10px;
padding-right: ${props => props.large ? '15px' : '25px'};
> div:last-child {
margin-left: 10px;
> div {
color: ${props => props.theme['gray-3']}
}
}
`
const Success = props => {
return props.balance === 0 ? < div /> : (
<LinkContainer to='/bch/transactions'>
<Wrapper>
<Text size='10px' weight={300}>BCH</Text>
<Banner inline type='informational'>
<FiatDisplay coin='BCH' cursor='pointer' size='10px' weight={300}>{props.balance}</FiatDisplay>
<span> </span>
<Text size='10px' weight={300}>
<FormattedMessage id='scenes.wallet.menutop.balance.watchonlybchbalance' defaultMessage='Non-Spendable' />
</Text>
</Banner>
</Wrapper>
</LinkContainer>
)
}
Success.propTypes = {
balance: PropTypes.number.isRequired
}
export default Success