mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-01 21:57:06 +01:00
09c60e2038
* UX: Icons: Remove IconCheck and fa-check * update jest snapshots * Update story * Remove dead CSS * Update ui/components/app/account-menu/account-menu.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/app/dropdowns/network-dropdown.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/pages/settings/networks-tab/networks-list-item/networks-list-item.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/pages/settings/networks-tab/networks-list-item/networks-list-item.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/pages/permissions-connect/redirect/permissions-redirect.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/pages/send/send-content/add-recipient/domain-input.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/pages/onboarding-flow/metametrics/metametrics.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/app/modals/transaction-confirmed/transaction-confirmed.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Update ui/components/app/modals/metametrics-opt-in-modal/metametrics-opt-in-modal.component.js Co-authored-by: George Marshall <george.marshall@consensys.net> * Fix jest snapshots * Update sizes of network andd account menu checks * Fix ICON_SIZES in account menu * Improvements * Use IconColor * Use IconColor * Lint * Update snapshots --------- Co-authored-by: George Marshall <george.marshall@consensys.net>
49 lines
1.2 KiB
JavaScript
49 lines
1.2 KiB
JavaScript
import React, { PureComponent } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import Modal from '../../modal';
|
|
import { Icon, ICON_NAMES, ICON_SIZES } from '../../../component-library';
|
|
import { IconColor } from '../../../../helpers/constants/design-system';
|
|
|
|
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">
|
|
<Icon
|
|
name={ICON_NAMES.CHECK}
|
|
color={IconColor.successDefault}
|
|
size={ICON_SIZES.XL}
|
|
/>
|
|
<div className="transaction-confirmed__title">
|
|
{`${t('confirmed')}!`}
|
|
</div>
|
|
<div className="transaction-confirmed__description">
|
|
{t('initialTransactionConfirmed')}
|
|
</div>
|
|
</div>
|
|
</Modal>
|
|
);
|
|
}
|
|
}
|