mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-05 23:44:56 +01:00
505517e8c7
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
39 lines
966 B
JavaScript
39 lines
966 B
JavaScript
import React, { PureComponent } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import Button from '../../../ui/button';
|
|
|
|
export default class SignatureRequestFooter extends PureComponent {
|
|
static propTypes = {
|
|
cancelAction: PropTypes.func.isRequired,
|
|
signAction: PropTypes.func.isRequired,
|
|
disabled: PropTypes.bool,
|
|
};
|
|
|
|
static contextTypes = {
|
|
t: PropTypes.func,
|
|
};
|
|
|
|
render() {
|
|
const { cancelAction, signAction, disabled = false } = this.props;
|
|
return (
|
|
<div className="signature-request-footer">
|
|
<Button
|
|
onClick={cancelAction}
|
|
type="secondary"
|
|
data-testid="signature-cancel-button"
|
|
>
|
|
{this.context.t('reject')}
|
|
</Button>
|
|
<Button
|
|
onClick={signAction}
|
|
type="primary"
|
|
data-testid="signature-sign-button"
|
|
disabled={disabled}
|
|
>
|
|
{this.context.t('sign')}
|
|
</Button>
|
|
</div>
|
|
);
|
|
}
|
|
}
|