2021-02-22 17:20:42 +01:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import Button from '../../../../components/ui/button';
|
|
|
|
|
|
|
|
export default function ConfirmationFooter({
|
|
|
|
onApprove,
|
|
|
|
onCancel,
|
|
|
|
approveText,
|
|
|
|
cancelText,
|
|
|
|
alerts,
|
|
|
|
}) {
|
|
|
|
return (
|
|
|
|
<div className="confirmation-footer">
|
|
|
|
{alerts}
|
|
|
|
<div className="confirmation-footer__actions">
|
2021-10-05 21:20:42 +02:00
|
|
|
<Button type="secondary" onClick={onCancel}>
|
2021-02-22 17:20:42 +01:00
|
|
|
{cancelText}
|
|
|
|
</Button>
|
2021-10-05 21:20:42 +02:00
|
|
|
<Button type="primary" onClick={onApprove}>
|
2021-02-22 17:20:42 +01:00
|
|
|
{approveText}
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
ConfirmationFooter.propTypes = {
|
|
|
|
alerts: PropTypes.node,
|
|
|
|
onApprove: PropTypes.func.isRequired,
|
|
|
|
onCancel: PropTypes.func.isRequired,
|
|
|
|
approveText: PropTypes.string.isRequired,
|
|
|
|
cancelText: PropTypes.string.isRequired,
|
|
|
|
};
|