mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-09 18:45:38 +00:00
c84740c4d4
* Make generic modal * Allow generic modals to be injected into send button component
24 lines
786 B
TypeScript
24 lines
786 B
TypeScript
import React from 'react';
|
|
import { SendButtonFactory } from './SendButtonFactory';
|
|
import translate from 'translations';
|
|
import { ConfirmationModal } from 'components/ConfirmationModal';
|
|
|
|
export const SendButton: React.SFC<{
|
|
onlyTransactionParameters?: boolean;
|
|
customModal?: typeof ConfirmationModal;
|
|
}> = ({ onlyTransactionParameters, customModal }) => (
|
|
<SendButtonFactory
|
|
onlyTransactionParameters={!!onlyTransactionParameters}
|
|
Modal={customModal ? customModal : ConfirmationModal}
|
|
withProps={({ onClick }) => (
|
|
<div className="row form-group">
|
|
<div className="col-xs-12">
|
|
<button className="btn btn-primary btn-block" onClick={onClick}>
|
|
{translate('SEND_trans')}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
)}
|
|
/>
|
|
);
|