2021-02-04 19:15:23 +01:00
|
|
|
import React, { PureComponent } from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import Button from '../../../ui/button';
|
2019-11-04 13:40:46 +01:00
|
|
|
|
|
|
|
export default class SignatureRequestFooter extends PureComponent {
|
|
|
|
static propTypes = {
|
|
|
|
cancelAction: PropTypes.func.isRequired,
|
|
|
|
signAction: PropTypes.func.isRequired,
|
2021-12-02 19:09:18 +01:00
|
|
|
disabled: PropTypes.bool,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2019-11-04 13:40:46 +01:00
|
|
|
|
|
|
|
static contextTypes = {
|
|
|
|
t: PropTypes.func,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2019-11-04 13:40:46 +01:00
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
render() {
|
2021-10-21 21:17:03 +02:00
|
|
|
const { cancelAction, signAction, disabled = false } = this.props;
|
2019-11-04 13:40:46 +01:00
|
|
|
return (
|
|
|
|
<div className="signature-request-footer">
|
2021-10-05 21:20:42 +02:00
|
|
|
<Button onClick={cancelAction} type="secondary" large>
|
2020-11-03 00:41:28 +01:00
|
|
|
{this.context.t('cancel')}
|
|
|
|
</Button>
|
2021-10-21 21:17:03 +02:00
|
|
|
<Button onClick={signAction} type="primary" disabled={disabled} large>
|
2020-11-03 00:41:28 +01:00
|
|
|
{this.context.t('sign')}
|
|
|
|
</Button>
|
2019-11-04 13:40:46 +01:00
|
|
|
</div>
|
2021-02-04 19:15:23 +01:00
|
|
|
);
|
2019-11-04 13:40:46 +01:00
|
|
|
}
|
|
|
|
}
|