1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-30 08:09:15 +01:00
metamask-extension/ui/components/app/modals/transaction-confirmed/transaction-confirmed.component.js
George Marshall 39e63432bf
Dark mode: icon transaction confirmed (#14130)
* Dark mode transaction confirmed replacing check icon

* Updating story path

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-03-23 13:35:52 -07:00

46 lines
1.1 KiB
JavaScript

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Modal from '../../modal';
export default class TransactionConfirmed extends PureComponent {
static contextTypes = {
t: PropTypes.func,
};
static propTypes = {
onSubmit: PropTypes.func,
hideModal: PropTypes.func,
};
handleSubmit = () => {
const { hideModal, onSubmit } = this.props;
hideModal();
if (onSubmit && typeof onSubmit === 'function') {
onSubmit();
}
};
render() {
const { t } = this.context;
return (
<Modal onSubmit={this.handleSubmit} submitText={t('ok')}>
<div className="transaction-confirmed__content">
<i
className="fa fa-check-circle fa-3x"
style={{ color: 'var(--color-success-default)' }}
/>
<div className="transaction-confirmed__title">
{`${t('confirmed')}!`}
</div>
<div className="transaction-confirmed__description">
{t('initialTransactionConfirmed')}
</div>
</div>
</Modal>
);
}
}