lbry-desktop/src/ui/component/walletBalance/view.jsx

26 lines
685 B
React
Raw Normal View History

2018-03-26 23:32:43 +02:00
// @flow
import React from 'react';
2018-03-26 23:32:43 +02:00
import CreditAmount from 'component/common/credit-amount';
2019-03-05 05:46:57 +01:00
import BalanceBackground from './balance-background.png';
2017-08-17 22:19:29 +02:00
2018-03-26 23:32:43 +02:00
type Props = {
balance: number,
};
const WalletBalance = (props: Props) => {
const { balance } = props;
2017-08-17 22:19:29 +02:00
return (
2019-03-19 02:04:53 +01:00
<section
2019-03-19 18:11:28 +01:00
className="card card--section card--wallet-balance"
2019-04-01 18:11:20 +02:00
style={{ backgroundImage: `url(${BalanceBackground})` }}
2019-03-19 02:04:53 +01:00
>
2019-07-21 23:31:22 +02:00
<h2 className="card__title">{__('Balance')}</h2>
<span className="card__content--large">
{(balance || balance === 0) && <CreditAmount badge={false} amount={balance} precision={8} />}
</span>
2017-08-17 22:19:29 +02:00
</section>
);
};
export default WalletBalance;