2021-02-04 19:15:23 +01:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import classnames from 'classnames';
|
2020-05-21 19:33:48 +02:00
|
|
|
|
2022-07-01 15:08:42 +02:00
|
|
|
const WalletOverview = ({ balance, buttons, className, icon, loading }) => {
|
2020-05-21 19:33:48 +02:00
|
|
|
return (
|
2020-06-01 19:54:32 +02:00
|
|
|
<div className={classnames('wallet-overview', className)}>
|
2020-05-21 19:33:48 +02:00
|
|
|
<div className="wallet-overview__balance">
|
2022-07-01 15:08:42 +02:00
|
|
|
{loading ? null : icon}
|
2020-11-03 00:41:28 +01:00
|
|
|
{balance}
|
2020-05-21 19:33:48 +02:00
|
|
|
</div>
|
2020-11-03 00:41:28 +01:00
|
|
|
<div className="wallet-overview__buttons">{buttons}</div>
|
2020-05-21 19:33:48 +02:00
|
|
|
</div>
|
2021-02-04 19:15:23 +01:00
|
|
|
);
|
|
|
|
};
|
2020-05-21 19:33:48 +02:00
|
|
|
|
|
|
|
WalletOverview.propTypes = {
|
|
|
|
balance: PropTypes.element.isRequired,
|
|
|
|
buttons: PropTypes.element.isRequired,
|
2020-06-01 19:54:32 +02:00
|
|
|
className: PropTypes.string,
|
2020-05-21 19:33:48 +02:00
|
|
|
icon: PropTypes.element.isRequired,
|
2022-07-01 15:08:42 +02:00
|
|
|
loading: PropTypes.boolean,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2020-05-21 19:33:48 +02:00
|
|
|
|
2020-06-01 19:54:32 +02:00
|
|
|
WalletOverview.defaultProps = {
|
|
|
|
className: undefined,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2020-06-01 19:54:32 +02:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export default WalletOverview;
|