NotificationDeleteModal.jsx 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import { withTranslation } from 'react-i18next';
  4. import Modal from 'react-bootstrap/es/Modal';
  5. class NotificationDeleteModal extends React.PureComponent {
  6. render() {
  7. const { t, notificationForConfiguration } = this.props;
  8. return (
  9. <Modal show={this.props.isOpen} onHide={this.props.onClose}>
  10. <Modal.Header className="modal-header" closeButton>
  11. <Modal.Title>
  12. <div className="modal-header bg-danger">
  13. <i className="icon icon-fire"></i> Delete Global Notification Setting
  14. </div>
  15. </Modal.Title>
  16. </Modal.Header>
  17. <Modal.Body>
  18. <p>
  19. {t('notification_setting.delete_notification_pattern_desc1', { path: notificationForConfiguration.triggerPath })}
  20. </p>
  21. <span className="text-danger">
  22. {t('notification_setting.delete_notification_pattern_desc2')}
  23. </span>
  24. </Modal.Body>
  25. <Modal.Footer className="text-right">
  26. <button type="button" className="btn btn-sm btn-danger" onClick={this.props.onClickSubmit}>
  27. <i className="icon icon-fire"></i> {t('Delete')}
  28. </button>
  29. </Modal.Footer>
  30. </Modal>
  31. );
  32. }
  33. }
  34. NotificationDeleteModal.propTypes = {
  35. t: PropTypes.func.isRequired, // i18next
  36. isOpen: PropTypes.bool.isRequired,
  37. onClose: PropTypes.func.isRequired,
  38. onClickSubmit: PropTypes.func.isRequired,
  39. notificationForConfiguration: PropTypes.object.isRequired,
  40. };
  41. export default withTranslation()(NotificationDeleteModal);