MyCrypto/common/components/SendButton.tsx
James Prado 910093b761 Update code blocks & generate / send tx buttons (#1333)
* Update account view routing

* update styles

* Fix WalletDecrypt types

* Replace disabled textareas with code blocks

* Fix broken animation

* Update snapshot

* Make contract interact dropdowns clearable & searchable

* Update node-sass to v4.8.3

* Fix swap inputs incorrectly incorrectly displaying invalid

* Refactor send tx & generate tx button

* Update broadcast tx & add more transaction details in tx confirmation

* Add signing prop to send button

* Update lite send

* Update codeblock styles

* Update snapshot

* Revert renaming Dropdown
2018-03-23 11:41:47 -05:00

34 lines
1.0 KiB
TypeScript

import React from 'react';
import { SendButtonFactory } from './SendButtonFactory';
import translate from 'translations';
import { ConfirmationModal } from 'components/ConfirmationModal';
import { SigningStatus } from 'components';
import './SendButton.scss';
export const SendButton: React.SFC<{
className?: string;
signing?: boolean;
customModal?: typeof ConfirmationModal;
}> = ({ signing, customModal, className }) => (
<React.Fragment>
<SendButtonFactory
signing={signing}
Modal={customModal ? customModal : ConfirmationModal}
withProps={({ disabled, openModal, signTx }) => (
<React.Fragment>
<button
disabled={disabled}
className={`SendButton btn btn-primary btn-block ${className}`}
onClick={() => {
!!signing ? (signTx(), openModal()) : openModal();
}}
>
{translate('SEND_TRANS')}
</button>
</React.Fragment>
)}
/>
<SigningStatus />
</React.Fragment>
);