1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-30 16:18:07 +01:00
metamask-extension/ui/pages/confirmation/components/confirmation-footer/confirmation-footer.js

34 lines
818 B
JavaScript
Raw Normal View History

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">
<Button rounded type="secondary" onClick={onCancel}>
{cancelText}
</Button>
<Button rounded type="primary" onClick={onApprove}>
{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,
};