b2630f6f21
- Users should be able to see the entered and promised amount, otherwise they might forget how much to send over. - This change also prepares for the future upgrade to support multiple coins.
43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
// @flow
|
|
import React from 'react';
|
|
import { Modal } from 'modal/modal';
|
|
import Button from 'component/button';
|
|
import Card from 'component/common/card';
|
|
import I18nMessage from 'component/i18nMessage';
|
|
|
|
type Props = {
|
|
sendAddress: string,
|
|
removeCoinSwap: (string) => void,
|
|
closeModal: () => void,
|
|
};
|
|
|
|
function ModalRemoveBtcSwapAddress(props: Props) {
|
|
const { sendAddress, removeCoinSwap, closeModal } = props;
|
|
|
|
return (
|
|
<Modal isOpen contentLabel={__('Confirm Address Removal')} type="card" onAborted={closeModal}>
|
|
<Card
|
|
title={__('Remove BTC Swap Address')}
|
|
subtitle={<I18nMessage tokens={{ address: <em>{`${sendAddress}`}</em> }}>Remove %address%?</I18nMessage>}
|
|
body={<p className="help--warning">{__('This process cannot be reversed.')}</p>}
|
|
actions={
|
|
<>
|
|
<div className="section__actions">
|
|
<Button
|
|
button="primary"
|
|
label={__('OK')}
|
|
onClick={() => {
|
|
removeCoinSwap(sendAddress);
|
|
closeModal();
|
|
}}
|
|
/>
|
|
<Button button="link" label={__('Cancel')} onClick={closeModal} />
|
|
</div>
|
|
</>
|
|
}
|
|
/>
|
|
</Modal>
|
|
);
|
|
}
|
|
|
|
export default ModalRemoveBtcSwapAddress;
|