You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.4 KiB
58 lines
1.4 KiB
4 years ago
|
import PropTypes from 'prop-types';
|
||
|
import React from 'react';
|
||
|
import classnames from 'classnames';
|
||
|
import Identicon from '../../../ui/identicon';
|
||
5 years ago
|
|
||
4 years ago
|
export default function AccountModalContainer(props, context) {
|
||
5 years ago
|
const {
|
||
4 years ago
|
className,
|
||
5 years ago
|
selectedIdentity,
|
||
|
showBackButton,
|
||
|
backButtonAction,
|
||
|
hideModal,
|
||
|
children,
|
||
4 years ago
|
} = props;
|
||
5 years ago
|
|
||
|
return (
|
||
4 years ago
|
<div
|
||
|
className={classnames(className, 'account-modal')}
|
||
|
style={{ borderRadius: '4px' }}
|
||
|
>
|
||
4 years ago
|
<div className="account-modal__container">
|
||
5 years ago
|
<div>
|
||
4 years ago
|
<Identicon address={selectedIdentity.address} diameter={64} />
|
||
5 years ago
|
</div>
|
||
|
{showBackButton && (
|
||
4 years ago
|
<div className="account-modal__back" onClick={backButtonAction}>
|
||
5 years ago
|
<i className="fa fa-angle-left fa-lg" />
|
||
4 years ago
|
<span className="account-modal__back-text">
|
||
|
{context.t('back')}
|
||
|
</span>
|
||
5 years ago
|
</div>
|
||
|
)}
|
||
4 years ago
|
<button className="account-modal__close" onClick={hideModal} />
|
||
5 years ago
|
{children}
|
||
|
</div>
|
||
|
</div>
|
||
4 years ago
|
);
|
||
5 years ago
|
}
|
||
|
|
||
|
AccountModalContainer.contextTypes = {
|
||
|
t: PropTypes.func,
|
||
4 years ago
|
};
|
||
5 years ago
|
|
||
|
AccountModalContainer.defaultProps = {
|
||
|
showBackButton: false,
|
||
|
children: null,
|
||
5 years ago
|
backButtonAction: undefined,
|
||
4 years ago
|
};
|
||
5 years ago
|
|
||
|
AccountModalContainer.propTypes = {
|
||
4 years ago
|
className: PropTypes.string,
|
||
5 years ago
|
selectedIdentity: PropTypes.object.isRequired,
|
||
|
showBackButton: PropTypes.bool,
|
||
5 years ago
|
backButtonAction: PropTypes.func,
|
||
5 years ago
|
hideModal: PropTypes.func.isRequired,
|
||
|
children: PropTypes.node,
|
||
4 years ago
|
};
|