2021-03-25 12:24:49 +01:00
|
|
|
// @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 = {
|
2021-04-04 09:10:55 +02:00
|
|
|
sendAddress: string,
|
|
|
|
removeCoinSwap: (string) => void,
|
2021-03-25 12:24:49 +01:00
|
|
|
closeModal: () => void,
|
|
|
|
};
|
|
|
|
|
|
|
|
function ModalRemoveBtcSwapAddress(props: Props) {
|
2021-04-04 09:10:55 +02:00
|
|
|
const { sendAddress, removeCoinSwap, closeModal } = props;
|
2021-03-25 12:24:49 +01:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Modal isOpen contentLabel={__('Confirm Address Removal')} type="card" onAborted={closeModal}>
|
|
|
|
<Card
|
|
|
|
title={__('Remove BTC Swap Address')}
|
2021-04-04 09:10:55 +02:00
|
|
|
subtitle={<I18nMessage tokens={{ address: <em>{`${sendAddress}`}</em> }}>Remove %address%?</I18nMessage>}
|
2021-03-25 12:24:49 +01:00
|
|
|
body={<p className="help--warning">{__('This process cannot be reversed.')}</p>}
|
|
|
|
actions={
|
|
|
|
<>
|
|
|
|
<div className="section__actions">
|
|
|
|
<Button
|
|
|
|
button="primary"
|
|
|
|
label={__('OK')}
|
|
|
|
onClick={() => {
|
2021-04-04 09:10:55 +02:00
|
|
|
removeCoinSwap(sendAddress);
|
2021-03-25 12:24:49 +01:00
|
|
|
closeModal();
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<Button button="link" label={__('Cancel')} onClick={closeModal} />
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</Modal>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ModalRemoveBtcSwapAddress;
|